[Solved]PHP upgrade results in warning

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]PHP upgrade results in warning

Post by jasnick »

Am upgrading all my sites to 1.11.6. (Using cPanel/Softaculous). Only problem is the warning I am getting:
Testing error_reporting to ensure E_DEPRECATED is disabled
E_DEPRECATED is enabled


Not sure how to disable E_DEPRECATED. I don't seem to have a php.ini file which I have read about - is it similar to the .htaccess file? First part of which is here:

AddHandler application/x-httpd-php53 .php
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off

#Options +FollowSymLinks

# To prevend E_STRICT problems with PHP 5.3+ you can uncomment the following lines
# Note: These settings should only be enabled for production sites!
#php_flag display_startup_errors 0
#php_flag display_errors 0
#php_flag html_errors 0
#php_value docref_root 0
#php_value docref_ext 0


I have been changing the php version from 5.2 to 5.3 before doing each upgrade. Is this the way to go?

Thanks
Last edited by jasnick on Tue May 21, 2013 11:51 am, 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: PHP upgrade results in warning

Post by velden »

You might try adding a line of code in config.php:

Code: Select all

error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));
But, do you actually see errors or is it a warning of cmsms' System Information page?
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: PHP upgrade results in warning

Post by jasnick »

Hi velden

Thanks for reply

No, no warnings as such on a site - this appears when I am upgrading to 1.11.6 via Softaculous since the advent of the need for php5.3 for CMSMS. My sites are hosted by Arvixe and I use cPanel and Softaculous for upgrading as it is so simple. This warning does not stop the upgrading - it just points out that this can occur if I don't add "the error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_DEPRECATED));"

So I was wondering where to add it.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: PHP upgrade results in warning

Post by Rolf »

Remove the #

Code: Select all

 #php_flag display_startup_errors 0 
#php_flag display_errors 0 
#php_flag html_errors 0 
#php_value docref_root 0 
#php_value docref_ext 0 
- + - + - + - + - + - + -
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: PHP upgrade results in warning

Post by jasnick »

Thanks Rolf - in the .htaccess file?

Do I do this BEFORE I upgrade to 1.11.6 - if I don't I will stilll see the warning I suppose ???
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: PHP upgrade results in warning

Post by velden »

jasnick wrote:Hi velden

...

So I was wondering where to add it.
Just at the beginning or end of the config.php file in the root of the website.

Disabling all errors as Rolf suggests is an option too. However, don't forget while developing or troubleshooting.
jasnick
Power Poster
Power Poster
Posts: 695
Joined: Sat Jan 15, 2011 8:36 am

Re: PHP upgrade results in warning

Post by jasnick »

Thanks velden - will do! :)
Locked

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