Problems with php.ini. Need help!
Igrep uploadmaxfilesize /usr/local/lib/php.ini
uploadmaxfilesize = 100M
grep postmaxsize /usr/local/lib/php.ini
postmaxsize = 100M
File that i try to upload = .zip file, size: 2,2 MB.
How i configure the php.ini?
php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
I went to the /use/local/lib/ and not find the file php.ini. I did the copy of file php-development.ini from /root/php-5.4.7/ and put it to the /usr/local/lib, after that i rename it to php.ini (that succession was in guide, that i found in internet). After that, i opened the file and change pregnants:
uploadmaxfilesize = 100M
postmaxsize = 100M
Thats all.
And yes, i restarted my server many times after that. The linode.com support coludnt find problem and adviced me to ask this question here. Who can help me?
6 Replies
@Nuvini:
Try running a phpinfo(), it'll show you which php.ini file is being used, so you can be sure you're editing the right one.
You was absolutely right. I create info.php and it says that php.ini is in /usr/local/php/etc/php.ini. It was empty. I copied my php.ini that i created few days ago, but it still dont work. WTF?
info php says that
postmaxsize = 8M
uploadmaxfilesize =2M
@Nuvini:
Try running a phpinfo(), it'll show you which php.ini file is being used, so you can be sure you're editing the right one.
Oops, im not a programmer, im just a blogger
@kalvinov:
info php says that
postmaxsize = 8M
uploadmaxfilesize =2M
Did it also say this before you made changes to php.ini? Have you also tried restarting nginx?
@NeonNero:
@kalvinov:info php says that
postmaxsize = 8M
uploadmaxfilesize =2M
Did it also say this before you made changes to php.ini? Have you also tried restarting nginx?
Depending on what you use for php you may also need to restart php itself (/etc/init.d/php restart (may also be called php5 or php-fpm))