RE: [PHP] $_FILES empty, trouble with uploading
Thanks to both of you. It seems the problem lies with Apache, actually. I did try the script with my install of lighttpd on the same server, and it goes flawlessly. It's not the first time this apache server give me trouble. So I'll use lighttpd and give one finger to this particular apache server. It's just curious that it stopped working one day. Thanks anyway ! Karl Date: Thu, 5 Mar 2009 21:01:27 +0800 From: sore...@gmail.com To: a...@ashleysheridan.co.uk; sadness...@hotmail.com CC: php-general@lists.php.net Subject: Re: Re: [PHP] $_FILES empty, trouble with uploading yes,I agree with Ash ,you can test it on a local testing server or the other server. if it work ,then you can sure it's environment problem. 2009-03-05 zhoo 发件人: Ashley Sheridan 发送时间: 2009-03-05 04:10:02 收件人: Karl St-Jacques 抄送: php-general 主题: Re: [PHP] $_FILES empty, trouble with uploading On Wed, 2009-03-04 at 09:02 -0500, Karl St-Jacques wrote: Hello people. I have some trouble with an upload script. It was working until the last 2 weeks. Whenever I tried to upload a file to a remote server, the $_FILES array is empty. I print global at start of the script there's nothing. Here's the form form action=http://random.server.com/video/upload.php; method=post enctype=multipart/form-data input type=hidden name=sessid value=yada input type=hidden name=ugroup value=xfr input type=hidden name=memberid value=25798 input type=hidden name=referrer value=server.com labelTitle:/labelinput type=text name=video_title value=N/A size=20 maxlenght=30 labelDescription:/labelinput type=text name=video_desc value=N/A size=20 maxlenght=255 labelCategory:/label select name=video_category option value=1yada/option option value=5yada2/option /select input type=hidden name=MAX_FILE_SIZE value=209715200 / input name=vid_files type=file size=30 /br / input type=submit name=upload class=sbtn value=Go! / /form So it's a basic form, I do have the enctype. the print_r($GLOBALS) return me [_FILES] = Array ( ) PHP Version 5.2.6file_uploads is On post_max_size 200M upload_max_filesize 200M upload_tmp_dir no value (it use /tmp) the /tmp folder is writable by apache (chmod 777) with 197G of space left. So, obviously, I'm lost as why I can't upload file anymore. Anyone had a similar problem ? What could I do to find/fix the problem ? Is it even related to PHP ? Thanks, Karl _ Share photos with friends on Windows Live Messenger http://go.microsoft.com/?linkid=9650734 Has your php.ini file been changed at all? If the max upload setting and memory settings have been reduced, it will affect uploads. How large is the file you are trying to upload? And lastly, does the script work on a local testing server? Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Experience all of the new features, and Reconnect with your life. http://go.microsoft.com/?linkid=9650730
[PHP] $_FILES empty, trouble with uploading
Hello people. I have some trouble with an upload script. It was working until the last 2 weeks. Whenever I tried to upload a file to a remote server, the $_FILES array is empty. I print global at start of the script there's nothing. Here's the form form action=http://random.server.com/video/upload.php; method=post enctype=multipart/form-data input type=hidden name=sessid value=yada input type=hidden name=ugroup value=xfr input type=hidden name=memberid value=25798 input type=hidden name=referrer value=server.com labelTitle:/labelinput type=text name=video_title value=N/A size=20 maxlenght=30 labelDescription:/labelinput type=text name=video_desc value=N/A size=20 maxlenght=255 labelCategory:/label select name=video_category option value=1yada/option option value=5yada2/option /select input type=hidden name=MAX_FILE_SIZE value=209715200 / input name=vid_files type=file size=30 /br / input type=submit name=upload class=sbtn value=Go! / /form So it's a basic form, I do have the enctype. the print_r($GLOBALS) return me [_FILES] = Array ( ) PHP Version 5.2.6file_uploads is On post_max_size 200M upload_max_filesize 200M upload_tmp_dir no value (it use /tmp) the /tmp folder is writable by apache (chmod 777) with 197G of space left. So, obviously, I'm lost as why I can't upload file anymore. Anyone had a similar problem ? What could I do to find/fix the problem ? Is it even related to PHP ? Thanks, Karl _ Share photos with friends on Windows Live Messenger http://go.microsoft.com/?linkid=9650734
RE: [PHP] trouble uploading more than 500 bytes...
Hello, I have trouble uploading files to a server. Actually I can't upload more than 500 bytes or so.Here's a quick print_r of the $_FILES [_FILES] = Array( [avatar] = Array ( [name] = index.html [type] = text/html [tmp_name] = /tmp/phpRbmXK5 [error] = 0 [size] = 505 )) If I try bigger file (540 bytes or 2mb) it's simply return this. [_FILES] = Array([avatar] = Array( [name] = ajax-loader.gif [type] = [tmp_name] = [error] = 3 [size] = 0) )error 3 is partial files sended. (By the way, there's no processing, only a print_r(); So here's my setup from the php.iniPHP Version 5.2.4-2ubuntu5.3 max_execution_time 1000 1000 max_input_nesting_level 64 64 max_input_time 1000 1000 memory_limit 999M 999M post_max_size 200M 200M upload_max_filesize 200M 200M upload_tmp_dir no value no value I run Apache/2.2.8I checked the /tmp folder. it's empty, even if uploading really big file, same for /var/tmp. the permission seems to be ok (chmod 777).So, I'm pretty clueless about that one. Anyone have any insight about this ? Thanks, Karl. _ Bit of a silly question, but it's bit me in the ass before. Are you sure you're editing the right php.ini file? I was working on a server at work where someone had left 3 php.ini files, all in places that looked like they were meant to be, and the only way to find the real one was through a phpinfo() check. Also, have you restarted the web server (Apache or IIS) since making the changes? Ash www.ashleysheridan.co.uk (Do you have rules or code of conduct for reply in this mailing list ?) Yup, the setting I wrote was the setting I took directly from the phpinfo(); And I restarted apache more than enough for the next 2 years (even the server :| ). I'm totally lost about that one ! Thank, Karl _
[PHP] trouble uploading more than 500 bytes...
Hello, I have trouble uploading files to a server. Actually I can't upload more than 500 bytes or so. Here's a quick print_r of the $_FILES [_FILES] = Array( [avatar] = Array ([name] = index.html[type] = text/html[tmp_name] = /tmp/phpRbmXK5[error] = 0[size] = 505 )) If I try bigger file (540 bytes or 2mb) it's simply return this. [_FILES] = Array([avatar] = Array( [name] = ajax-loader.gif [type] = [tmp_name] = [error] = 3 [size] = 0) ) error 3 is partial files sended. (By the way, there's no processing, only a print_r(); So here's my setup from the php.ini PHP Version 5.2.4-2ubuntu5.3 max_execution_time 1000 1000 max_input_nesting_level 64 64 max_input_time 1000 1000 memory_limit 999M 999M post_max_size 200M 200M upload_max_filesize 200M 200M upload_tmp_dir no value no value I run Apache/2.2.8 I checked the /tmp folder. it's empty, even if uploading really big file, same for /var/tmp. the permission seems to be ok (chmod 777). So, I'm pretty clueless about that one. Anyone have any insight about this ? Thanks, Karl. _