Issue with upload_max_filesize

I have the following settings in my PHP.INI (there is only one, this is on a test server on Windows and is located in D:\WWW\PHP)

post_max_size=184M
upload_max_filesize=184M

However, despite restarting Apache and also rebooting the machine, upload_max_filesize is showing :

upload_max_filesize 256M

Am I doing something wrong ?

Details of software : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12

How exactly are you viewing the settings?

I’m using the output of a created page :

<?php phpinfo(); ?>

Assuming you are requesting the file via a URL on your web server, such as http://localhost/your_file.php, does the Loaded Configuration File value, near the top of the output, match the php.ini that you changed?

Beyond that, you can put php settings into a .htaccess file. If there is a .htaccess file, are there any php_value … lines in it?

No PHP values in the .htaccess file.

The Loaded Configuration File matches the php.ini file location.

There is also an Additional .ini files parsed value in the phpinfo() output that could override the main php.ini settings.

Are both the ‘local’ and ‘master’ values the same for the post_max_size and upload_max_size settings?

About the only other common problem is if there are typo/syntax errors in the php.ini, any settings past the point of the error don’t take effect and there’s no .ini syntax error reporting from php. Try moving the lines you have set to be near the top of the php.ini. Are there multiple lines setting the post_max_size setting? Is the line you changed uncommented? Is the exact value 184M (with only just the M, not MB)?

Sponsor our Newsletter | Privacy Policy | Terms of Service