简体   繁体   中英

Changing 'upload_max_filesize' in php.ini does not change the value in phpinfo()

I'm using Wordpress via Bitnami + Xampp and am trying to change the upload_max_filesize variable since 2M is way too small. So I change it to 64M as shown here:

php.ini 文件

I also have post_max_size=64M .

However, Wordpress still shows that the max upload size is only 2M.

只有2M?

I went to phpinfo() to look into the issue. I am editing the correct php.ini file that is being pointed too. And, on top of that, phpinfo() shows that upload_max_filesize is still set to 2M!

什么鬼...

Yes, I did restart the Apache server on Xampp (by clicking stop, then start). And I tried changing some Wordpress defined variables as described in this blog post .

Common mistake is to assume that changing upload_max_filesize is sufficient. It is not. Because file upload goes via POST request you must also change post_max_size which must be at least the same value (I'd add a bit atop).

Alright, figured it out. Problem is, I'm not sure how it worked.

So I was using port 8080 since port 80 wasn't working for some reason. After restarting my computer, I started Apache up again. This time, it didn't work on port 8080. So I changed it back to port 80 and now, well, it works.

No idea why this is the solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM