Archive for June, 2006

PHP upload limit, script won’t upload over a certain file size

Thursday, June 15th, 2006

The issue is with a PHP upload script, small files work, but larger files won’t upload and the page says that it is not found, or something like that.

To fix this you need to change the default limit, its 2MB by default and therefore needs to be changed.

In php.ini there are actually *two* settings you have to consider when setting upload limits:

upload_max_filesize

and

post_max_size

By changing these, to a higher figure (note they are in bytes) you can make the uploads work on bigger files.

On my php.ini config the “post_max_size” was not listed, so I added it under the directive for “upload_max_filesize” and gave it the same figure and then you bounce apache and away you go!