[SOLVED!!] - Large file upload problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

[SOLVED!!] - Large file upload problem

Postby CasaDyD » 16. February 2009 15:52

Hi all,

new here on the board so go easy on me please... :)
I did a bit of searching on this forum (and all over the web :)) for topics related to my problem but couldn't find much usefull.

The problem is as follows :

I have an uploadscript that's working just fine, very fine actually. It catches the number of files, custom errors, the whole lot.
But it only works with files up to 1MB.
You're probably gonna start screaming stuff like "max_post_size" and all that now, but don't bother. max_post_size is set to 800M and max_upload_filesize is set to 725M. The field I'm uploading my content to is a MySQL LONGBLOB (should take up to 4GB).
Session_timeout is set to a staggering 8 hours, script execution and input time are both set to 28800 seconds as well.
And then I came across this LimitRequestBody setting for Apache. So I created a .htaccess file setting this to 0 (meaning unlimited)
It still will not accept files greater than 1MB and I have no more ideas of where to look.

So, here's the summary :
- MySQL field is LONGBLOB
- max_post_size and max_upload_filesize are both set to well over 700MB (yes, I need this much data)
- session_timeout, script execution and input_timeout are all set to 8 hours
- Apache's LimitRequestBody is set to 0 through a .htaccess file
- no errors are generated whatsoever, no MySQL errors, no PHP errors, no Apache errors... :S


Any help would be greatly appreciated, I'm not exactly a noob when it comes to webdevelopment though I have been out of it for quite a while (about 3 years) now.

Configuration is the following :

Windows XP SP2
Xampp 1.7.0 Win32 binary (only MySQL and PHP are active, no FileZilla or Mercury is running)

Thanks in advance!

edit: here's some phpinfo() :

Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap C:\xampp\php\browscap\browscap.ini C:\xampp\php\browscap\browscap.ini
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 6135 6135
expose_php On On
extension_dir C:\xampp\php\ext\ C:\xampp\php\ext\
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .;C:\xampp\php\pear\ .;C:\xampp\php\pear\
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 28800 28800
max_input_nesting_level 64 64
max_input_time 28800 28800
memory_limit 128M 128M
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 800M 800M
precision 12 12
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals Off Off
register_long_arrays On On
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path no value no value
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 800M 800M
upload_tmp_dir C:\xampp\tmp C:\xampp\tmp
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off
Last edited by CasaDyD on 16. February 2009 17:09, edited 1 time in total.
ManicManiac -> World War III is coming, and boy am I going to have fun or what? Bring it on!
CasaDyD
 
Posts: 4
Joined: 16. February 2009 15:29

Re: Large file upload problem

Postby Wiedmann » 16. February 2009 16:27

But it only works with files up to 1MB.

OK, you are talking about a file upload and the target script for the POST request stops with which error message/code?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Large file upload problem

Postby CasaDyD » 16. February 2009 16:48

Wiedmann wrote:
But it only works with files up to 1MB.

OK, you are talking about a file upload and the target script for the POST request stops with which error message/code?



Apparantly it quits execution because of MySQL max_packet_size

I've set this to 800M now both in my.ini and through following cmd : mysql > set global max_allowed_packet = 800 * 1024 * 1024;

Of course I've restarted MySQL but it still won't accept the uploads. It gives following error : Got a packet bigger than 'max_allowed_packet' (forgot about the existance of PHP's mysql_error()-function...)

Setting it through cmd doesn't change much though... :/


Edit : it's fixed already. It was indeed the max_allowed_packet in my.cnf that was still set to 1M (I feel silly now... :( :P )

Thanks a lot though!
ManicManiac -> World War III is coming, and boy am I going to have fun or what? Bring it on!
CasaDyD
 
Posts: 4
Joined: 16. February 2009 15:29

Re: Large file upload problem

Postby Wiedmann » 16. February 2009 17:00

I've set this to 800M now both in my.ini

It gives following error : Got a packet bigger than 'max_allowed_packet'

Is your Server not using a "my.cnf" (in \xampp\mysql\bin)?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Large file upload problem

Postby CasaDyD » 16. February 2009 17:05

Wiedmann wrote:
I've set this to 800M now both in my.ini

It gives following error : Got a packet bigger than 'max_allowed_packet'

Is your Server not using a "my.cnf" (in \xampp\mysql\bin)?



Yes, so it seems... :D
Thanks, it's working lilke a charm now, changed the connection timeout for MySQL as well while I was at it.
ManicManiac -> World War III is coming, and boy am I going to have fun or what? Bring it on!
CasaDyD
 
Posts: 4
Joined: 16. February 2009 15:29


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 34 guests