[英]phpinfo() showing different upload_max_filesize than in php.ini
I am getting a different value for upload_max_filesize
from php.ini
file and phpinfo()
. 我从
php.ini
文件和phpinfo()
获得一个不一样的upload_max_filesize
值。
While on php.ini
I have setup 128M for it, on phpinfo()
it is showing me 2M. 在
php.ini
我为此设置了128M,在phpinfo()
它显示了2M。 I have tried restart the apache
and add a new php.ini
to another folder and point to it using VHost but that didn't solve it. 我尝试重新启动
apache
并将新的php.ini
添加到另一个文件夹,并使用VHost指向它,但这并不能解决问题。
The problem was that there was an error on php.ini
at line 180, so every value after that turns to default. 问题是第180行的
php.ini
出现错误,因此之后的每个值都变为默认值。 And as upload_max_filesize
was after that, it have turn to default value of 2M. 之后,
upload_max_filesize
变为默认值2M。
I could discover that by typing php -i
on the command line, and even though it have rendered all php settings, the first line was an error, so you can check there where is the error on your php.ini
. 我可以通过在命令行中输入
php -i
来发现它,即使它已经呈现了所有php设置,第一行还是一个错误,因此您可以检查php.ini
上的错误。 It also tells you which line the error is. 它还会告诉您错误所在的行。
Hope it can help someone else! 希望它可以帮助别人!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.