These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Virtualmin, FCGID, apache log, E_DEPRECATED on the new forum.
Hello,
I'm trying to get off PHP Deprecated logs for an old version of one CMS (SPIP 1.8.3).
I have been trying different things, and with mod_php, it can be done with using the "php value error_reporting = 22519" in the vhost configuration file in /etc/apache2/sites-available (I'm working with ubuntu 12.04 server).
So I try to do it with FCGID, I know, I read that "php value" can't be passed in vhost configuration files, is it true ?
So should it be done by modify php5.fcgi in /home/.../domain/fcgi-bin ?
as other methods, php.ini, php code doesn't work, it's ok for some values (E_NOTICE) but not for (E_DEPRECATED)
Greatings,
Eric
PS : an exemple of modification here : http://www.howtoforge.com/forums/archive/index.php/t-45046.html
Howdy,
To make changes to the PHP configuration when using FCGID or CGI, you'd want to edit $HOME/etc/php.ini.
You can only use "php_value" in the Apache config if you're using mod_php.
-Eric
Hello,
As I change "error_reporting" value in $HOME/etc/php.ini, the detail for apache logs change but not for E_DEPRECATED.
I've only try with those different values :
1 - error_reporting = E_ALL
2 - error_reporting = E_ALL & ~E_NOTICE
3 - error_reporting = E_ALL & ~E_NOTICE $ ~E_DEPRECATED
The constant value is ever good with phpinfo().
1 : 30719 (PHP 5.3.10)
2 : 30711
3 : 22519
But when using 3, there is no more PHP Notice but still PHP Deprecated warnings.
It's the same as I modify the error reporting in the CMS code directly. 3 never hide deprecated errors.
The only way I have it good was to give a "php value" in vhost conf with the right constant and in mod_php.
I have find/grep all error_reporting value in the code and no more that the one I modified to error_reporting = E_ALL & ~E_NOTICE $ ~E_DEPRECATED.
So I think it's related to the code compilation and FCGID, or I missed something ...
Greatings,
Eric
PS : I go on testing different configuration as all my domains are now on fcgid mode, and got 1 with mod_php (so an exception), is not what I need.
for FCGID mode, is it only the file /home/$domain/fcgi-bin/php5.fcgi which is use or /home/$domain/cgi-bin/php5.cgi is used too ?
Hello,
I've try to modify the /home/$domain/fcgi-bin/php5.fcgi.
Configuration parameter change passed by php5.fcgi are known by phpinfo(). I've change error_reporting value to 0.
Logs are changing, add or remove E_notice.
But for E_deprecated, nothing to do. Still a huge of those ligne wich are polluting the true error one.
So it's possible to give parameters with /home/$domain/fcgi-bin/php5.fcgi. (http://www.virtualmin.com/node/17809, http://www.howtoforge.com/forums/archive/index.php/t-45046.html)
But it is not the solution for me. I look at code, perhaps a hardcoded thing ... or I missing something, strange behaviour.
Greatings,
Eric
Hello,
It's solved.
It was an "external" function which is called in the CMS (added by me), with missing exclusion of E_deprecated.
So for those which use old version of Spip (1.8.3). If no external script :
Modifying the error_reporting in inc-version.php (or best, add them to the file mes_options.php3) with those values work : E_ALL & ~E_NOTICE & ~E_DEPRECATED.
Modifying those values in /home/$domain/etc/php5/php.ini works too.
If you use "external" scripts or function, do a verification to the function provider. If it's one of your own script or function, verify with :
grep -Ri 'error_reporting'
Greatings,
Eric
Howdy,
Aha! Great, I'm glad you got it. I was kind of stuck :-)
Thanks for letting us know how you fixed it!
-Eric