[Solved]Need 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
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

[Solved]Need to disable E_DEPRECATED

Post 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
Last edited by jasnick on Thu Sep 26, 2013 12:25 pm, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Need to disable E_DEPRECATED

Post 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
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Need to disable E_DEPRECATED

Post by Rolf »

Check default .htaccess file. Unquote the lines
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need to disable E_DEPRECATED

Post 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.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Need to disable E_DEPRECATED

Post 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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need to disable E_DEPRECATED

Post 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
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Need to disable E_DEPRECATED

Post 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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: Need to disable E_DEPRECATED

Post 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!.
Locked

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