(SOLVED)Where to disable E_DEPRECATED?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
rab
Forum Members
Forum Members
Posts: 120
Joined: Wed Sep 05, 2007 8:35 pm

(SOLVED)Where to disable E_DEPRECATED?

Post by rab »

Hi,

The CMSMS documentation says to disable php's E_DEPRECATED by changing the error level setting in php.ini. Our host's support people said we could do this by creating a new php.ini file in the root folder with the line:

Code: Select all

error_reporting = E_ALL & ~E_DEPRECATED
Unfortunately, that didn't work!

Another support person said he thought the CMSMS config.php file was overriding the added php.ini file, thus negating its effect. He suggested instead of adding a new php.ini file, just add this line to CMSMS's config.php file:

Code: Select all

error_reporting(E_ALL &  ~E_DEPRECATED); 
That did work, but...

Since I'm no php guru, I'm wondering if this is OK to do, or if it might cause other problems?

Thanks for any advice!
Last edited by rab on Mon Jun 03, 2013 10:19 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Where to disable E_DEPRECATED?

Post by calguy1000 »

CMSMS does not override the error_reporting stuff UNLESS

a: debug mode is enabled
or
b: some third party module does.... but I haven't seen one that does yet. Modules are loaded too late in the process, changing error_reporting in a module would have limited use.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Where to disable E_DEPRECATED?

Post by Rolf »

What host do you use? You have CPanel?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
manuel
Power Poster
Power Poster
Posts: 353
Joined: Fri Nov 30, 2007 9:15 am

Re: Where to disable E_DEPRECATED?

Post by manuel »

Dear Rab,

As it happens, i had a chat support session with Arvixe about the same a while ago.
The conclusion at the end of my support session was that i could either enable or disable the error_reporting by setting a custom php.ini. :-\

Because there was no real solution that allowed me to set the *level* of the error_reporting with a custom php.ini, i actually had disabled error_reporting completely!

But now by adding error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE); in the config.php file (thx for the tip) i got everything to work as expected without having to resort to using a custom php.ini file and completely disabling all error_reporting.

So normally, we would be able to set the error_reporting *level* in 3 ways:
- php.ini (apparently not possible on Arvixe at the moment)
- .htaccess (not possible on many hosts so nothing special)
- inside a php script (possible at Arvixe)

So i would be inclined to say that this is an issue of the hosting provider and not of cmsms ;D

And as for the question about this being an issue:
If you upgrade CMSMS it's possible that the custom error_reporting line you added is removed.
Just make sure to re-include it when upgrading and you should be fine.

Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
rab
Forum Members
Forum Members
Posts: 120
Joined: Wed Sep 05, 2007 8:35 pm

Re: Where to disable E_DEPRECATED?

Post by rab »

I agree - it's a hosting issue, not CMSMS. The only concern I have is if adding the error level code to the config.php file could screw up something else - either now or down the road.
User avatar
manuel
Power Poster
Power Poster
Posts: 353
Joined: Fri Nov 30, 2007 9:15 am

Re: Where to disable E_DEPRECATED?

Post by manuel »

Dear Rab,

I had just edited my reply to include a response about that when i noticed you already responded :)

Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
rab
Forum Members
Forum Members
Posts: 120
Joined: Wed Sep 05, 2007 8:35 pm

Re: Where to disable E_DEPRECATED?

Post by rab »

Great, thanks!
User avatar
manuel
Power Poster
Power Poster
Posts: 353
Joined: Fri Nov 30, 2007 9:15 am

Re: Where to disable E_DEPRECATED?

Post by manuel »

Dear Rab,

Feel free to slap a [solved] in front of the subject of your first post ;)

Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
rab
Forum Members
Forum Members
Posts: 120
Joined: Wed Sep 05, 2007 8:35 pm

Re: (SOLVED)Where to disable E_DEPRECATED?

Post by rab »

I've been working with various of Arvixe's support people for over a week now, and one of them seems to have finally come up with a solution. Basically, it's to put a custom php.ini in the Admin folder, not the root. When I added the following php.ini to the Admin folder, it worked!

Code: Select all

upload_max_filesize = 10M
post_max_size = 10M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
register_globals = Off
display_errors = Off
output_buffering = On
max_execution_time = 120
Sure hope this puts an end to this issue!
Locked

Return to “[locked] Installation, Setup and Upgrade”