Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Nov 30, 2012 5:03 am 
Offline
Newbie

Joined: Fri Nov 30, 2012 4:56 am
Posts: 3
Hello! I use nginx + php 5.4.7 + fpm + wordpress. I have a problem with configuration "upload_max_filesize" for php.ini. I wrote all parameters in php.ini, but its doesnt work. If i try to upload file, wordpress write me: "The uploaded file exceeds the upload_max_filesize directive in php.ini."

Igrep upload_max_filesize /usr/local/lib/php.ini
upload_max_filesize = 100M

grep post_max_size /usr/local/lib/php.ini
post_max_size = 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:

upload_max_filesize = 100M
post_max_size = 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? :)


Top
   
PostPosted: Fri Nov 30, 2012 11:13 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
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.


Top
   
PostPosted: Fri Nov 30, 2012 12:18 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Running "php -i | grep php.ini" shows you where the commandline version of PHP is getting its config file, not where the web version is (try Nuvini's suggestion through your webserver).


Top
   
PostPosted: Mon Dec 03, 2012 3:40 am 
Offline
Newbie

Joined: Fri Nov 30, 2012 4:56 am
Posts: 3
Nuvini wrote:
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

post_max_size = 8M
upload_max_filesize =2M

:(

Nuvini wrote:
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 :).


Top
   
PostPosted: Wed Dec 05, 2012 7:04 am 
Offline
Newbie

Joined: Fri Nov 30, 2012 4:56 am
Posts: 3
Yo!??


Top
   
PostPosted: Wed Dec 05, 2012 7:36 am 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
kalvinov wrote:
info php says that

post_max_size = 8M
upload_max_filesize =2M

Did it also say this before you made changes to php.ini? Have you also tried restarting nginx?


Top
   
PostPosted: Wed Dec 05, 2012 2:57 pm 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
NeonNero wrote:
kalvinov wrote:
info php says that

post_max_size = 8M
upload_max_filesize =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))


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group