LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-08-2011, 11:29 AM   #1
geokker
Member
 
Registered: Jun 2004
Distribution: Ubuntu 6.10 Edgy Eft
Posts: 60

Rep: Reputation: 15
php.ini:upload_max_filesize reverts to default when error_reporting = All


I have a bizarre problem with my php5 system php.ini file. I have these relevant directives set:

Code:
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
upload_max_filesize = 13M
when I call phpinfo(), it reports the PHP default max upload size of 2M

If I comment out error_reporting, it works i.e. 13M is reported.

What gives?

I need to suppress the errors. Can I change the default from 2M perhaps?
 
Old 07-10-2011, 04:54 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,420

Rep: Reputation: 100Reputation: 100
Erase the ";" in the first line and use the = assignment instead of the function call
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

I guess that could help...

Last edited by j-ray; 07-10-2011 at 04:56 AM.
 
Old 07-10-2011, 08:09 AM   #3
geokker
Member
 
Registered: Jun 2004
Distribution: Ubuntu 6.10 Edgy Eft
Posts: 60

Original Poster
Rep: Reputation: 15
No, that didn't work I'm afraid. I think I've tried every permutation. I don't understand the link between the error_reporting directive and reading php.ini. If I completely comment out the line, php.ini is fine.
 
Old 07-11-2011, 02:10 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,420

Rep: Reputation: 100Reputation: 100
the error_reporting directive must not stand there as a function call with an endening ";". It is not a php script but an ini file. Did you restart the server after making the changes in php.ini?
 
Old 07-11-2011, 10:39 AM   #5
geokker
Member
 
Registered: Jun 2004
Distribution: Ubuntu 6.10 Edgy Eft
Posts: 60

Original Poster
Rep: Reputation: 15
Yes, I restart Apache every change.

Code:
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
Blocks php.ini (or reverts to defaults) but enables the code.

Code:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
Enables changes to php.ini but blows up the code.

So, presumably, leaving error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); in makes the php.ini file unreadable. This is simply a syntax error and the code is at fault.

The weird thing is that commenting out all references to error_reporting blows up the code.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP memory_limit vs. upload_max_filesize fhsm Linux - Software 4 02-24-2011 05:49 AM
[SOLVED] php.ini.rpmsave instead of php.ini ilvista Linux - Server 3 02-01-2011 04:39 PM
upload_max_filesize won't change from default? please help CMaan Linux - Software 4 08-23-2010 06:09 PM
php.ini "upload_max_filesize 2meg" error on large pixel images under 1meg DT (D_Turmined) Linux - Newbie 4 03-25-2009 07:46 AM
php.ini-dist to php.ini lord-fu Programming 10 05-02-2006 05:24 PM


All times are GMT -5. The time now is 03:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration