Upload_max_filesize does not change

I am trying to increase the upload_max_filesize value to 10485760 (10M).

I use:

ini_set('upload_max_filesize',10485760);

      

This always returns false and upload_max_filesize stays at 2M. I am using php 5.2.8 on Windows and I do not have ini_set disabled and I am also not in safe mode.

Does anyone know why this is not working? Thanks to

+1


a source to share


5 answers


The upload_max_size parameter will be checked before running your PHP script. Therefore, by the time the setting was changed, the download was no longer successful.



+4


a source


Try to edit the value in your php.ini file and not your PHP script. Your script may not have permission to override php.ini for some reason.



+3


a source


Check variable [post_max_size][1]

.

Sets the maximum size of data allowed. This setting also affects file uploads.

0


a source


Try the following:

ini_set('upload_max_filesize','100M');

      

0


a source


does it work in apache (mod_php)? if so, apache has settings that affect this as well.

The apache web server has a LimitRequestBody configuration directive that limits the size of all POST data regardless of the web scripting language used. Some RPM installations set the request body to a limit of 512Kb. You will need to change this to a larger value or delete the entry entirely.

-1


a source







All Articles