Page 1 of 1

[Solved]Need to disable E_DEPRECATED

Posted: Sun Jul 28, 2013 1:38 am
by jasnick
Good morning

When upgrading, I see a warning about disabling E-DEPRECATED by editing the php.ini file.

Where is this located? I did a search but no file found.

Thanks

Re: Need to disable E_DEPRECATED

Posted: Sun Jul 28, 2013 9:03 am
by velden
Depending on what permissions you have on the server you may not be able to find/edit that file at all. You probably can only edit that file when it's your own server or vps.

You can find the file location by creating and uploading a .php file with

Code: Select all

<?php phpinfo() ?>
When 'visiting' that file with your browser you get a lot of useful information about the php installation/configuration/settings.

There are other options to disable deprecated messages:

.htaccess http://stackoverflow.com/questions/5628 ... -error-log
extra php code in config.php http://forum.cmsmadesimple.org/viewtopi ... 86#p298386

Re: Need to disable E_DEPRECATED

Posted: Sun Jul 28, 2013 9:48 am
by Rolf
Check default .htaccess file. Unquote the lines

Re: Need to disable E_DEPRECATED

Posted: Mon Jul 29, 2013 1:18 am
by jasnick
Thanks velden and Rolf

I uncommented the relevant lines in .htaccess on a site and then couldn't load Admin - I got an internal server error message. I had to comment them again to load Admin. Then I added php_flag display_errors off to .htaccess - same result.

I really don't know what I am doing :-\

I used to be able to upgrade without all this fuss and having to alter things.

Re: Need to disable E_DEPRECATED

Posted: Mon Jul 29, 2013 1:34 am
by Jo Morg
jasnick wrote:I used to be able to upgrade without all this fuss and having to alter things.
Yeah, that's a php issue. The way to disable them also differs from one host to another. Some allow you to have a php.ini with only the directives you want to overwrite on it, placed on the script root (in this case probably the domain's root), others allow the .htaccess directives (apparently your's doesn't). Try the php.ini aproach:

Code: Select all

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
display_errors = Off
log_errors = On
if this doesn't work, you will have to contact your host to change this.
HTH

Re: Need to disable E_DEPRECATED

Posted: Mon Jul 29, 2013 1:49 am
by jasnick
Thanks Jo - things are a bit more clear now :)
Jo Morg wrote:Try the php.ini aproach
What does this mean exactly? To what file do I add the code?

Thanks

Re: Need to disable E_DEPRECATED

Posted: Mon Jul 29, 2013 1:58 am
by Jo Morg
jasnick wrote:
Jo Morg wrote:Try the php.ini aproach
What does this mean exactly? To what file do I add the code?

Thanks
On the root folder where CMSMS is instaled, create a php.ini and paste the code from my previous post.
It works on some hosts :), otherwise you need to check CPanel (or whatever flavor you have on your host) to see if there is any option/tool to access the main php.ini. On some hosts, you don't have but indirect access to it. The alternative would be (as I stated before) contacting your host, to change that flag, on your domain/s.
HTH

Re: Need to disable E_DEPRECATED

Posted: Mon Jul 29, 2013 2:26 am
by jasnick
Thank Jo - I created the php.ini file (with the code) and uploaded it but it didn't work so it looks like I will need to contact the hosting company to sort this out.

Thanks for the help!.