Can't upload large files through PHP script even after editing php.ini
I have Ubuntu installed with LAMP stack (PHP5 and Apache2) on my VPS. My file upload script works perfectly on local, but it won't upload the same 8MB FLV file on the linode. It returns "Empty file". It does accept FLV files under 3MB and JPEGs with no problem.
Here is how I edited the php.ini
file:
max_execution_time = 700
max_input_time = 700
memory_limit = 128M
post_max_size = 110M
file_uploads = On
upload_max_filesize = 105M
mysql.connect_timeout = 60
My script sets this variable for max file size: $max_file_size = 102537*1024; //max file upload size (bytes)
I have rebooted the VPS each time the php.ini file is changed. Still I get an "Empty file" when I try to upload the 8MB FLV file. By the way, I am editing the php.ini file under /etc/php开发者_如何转开发5/apache2/php.ini and confirmed with a php info file that this is the correct file.
Would appreciate any help or advice.
You may check configuration in Apache httpd.conf, it has a option called LimitRequestBody.
The html side may also limit the size
Please check it.
精彩评论