I have WampServer 2 installed on my Windows 7 computer. I\'m using Apache 2.2.11 and PHP 5.2.11. When I attempt to upload any file from a form, it seems to upload, but in PH
Thank you everybody for the vary comprehensive replies. Those are all very helpful. The answer turned out to be something very odd. It turns out that PHP 5.2.11 doesn't like the following:
post_max_size = 2G
or
post_max_size = 2048M
If I change it to 2047M
, the upload works.
I have a same problem looking 2 hours ,is very simple to we check our server configuration first.
Example:
echo $upload_max_size = ini_get('upload_max_filesize');
echo $post_max_size=ini_get('post_max_size');
any type of file size is :20mb
, but our upload_max_size
is above 20mb
but array is null
. Answer is our post_max_size
should be greater than upload_max_filesize
post_max_size = 750M
upload_max_filesize = 750M
I was struggling with the same problem and testing everything, not getting error reporting and nothing seemed to be wrong. I had error_reporting(E_ALL) But suddenly I realized that I had not checked the apache log and voilà! There was a syntax error on the script...! (a missing "}" )
So, even though this is something evident to be checked, it can be forgotten... In my case (linux) it is at:
/var/log/apache2/error.log