Page 1 of 1

[Solved]PHP upgrade results in warning

Posted: Tue May 21, 2013 7:18 am
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

Re: PHP upgrade results in warning

Posted: Tue May 21, 2013 10:10 am
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?

Re: PHP upgrade results in warning

Posted: Tue May 21, 2013 10:48 am
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.

Re: PHP upgrade results in warning

Posted: Tue May 21, 2013 11:15 am
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 

Re: PHP upgrade results in warning

Posted: Tue May 21, 2013 11:32 am
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 ???

Re: PHP upgrade results in warning

Posted: Tue May 21, 2013 11:35 am
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.

Re: PHP upgrade results in warning

Posted: Tue May 21, 2013 11:50 am
by jasnick
Thanks velden - will do! :)