Description of problem: My error_log from Apache has grown huge due to PHP messages output from gallery2. # du -sh gallery*error_log* 1.6G gallery.cronenworth.com-error_log 4.1G gallery.cronenworth.com-error_log-20120909 4.9G gallery.cronenworth.com-error_log-20120916 5.2G gallery.cronenworth.com-error_log-20120923 4.8G gallery.cronenworth.com-error_log-20120930 Version-Release number of selected component (if applicable): gallery2-2.3.2-2.fc17.noarch Additional info: Sample log output: [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryCoreApi::getPluginParameter() should not be called statically in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 3078 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 300 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryPluginHelper_simple::getParameter() should not be called statically in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 302 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryPluginHelper_simple::_fetchAllParameters() should not be called statically in /usr/share/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 222 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryDataCache::containsKey() should not be called statically in /usr/share/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 281 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryDataCache::_getCache() should not be called statically in /usr/share/gallery2/modules/core/classes/GalleryDataCache.class on line 203 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryDataCache::get() should not be called statically in /usr/share/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 282 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryDataCache::_getCache() should not be called statically in /usr/share/gallery2/modules/core/classes/GalleryDataCache.class on line 186 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryUtilities::prefixFormVariable() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/core/classes/GallerySession.class on line 986 [Fri Oct 05 08:00:51 2012] [error] [client 66.249.73.234] PHP Strict Standards: Non-static method GalleryUtilities::prefixFormVariable() should not be called statically, assuming $this from incompatible context in /usr/share/gallery2/modules/core/classes/GallerySession.class on line 993
Do you have any custom php.ini settings or gallery2 configs set? Like Strict?
Created attachment 622271 [details] php.ini I do not have any settings that should be enabling this output. I have attached my /etc/php.ini file. I do not have a custom php.ini file for gallery2. The only setting I have changed is to allow larger file upload sizes.
See if, in modules/core/classes/Gallery.class, changing line 672 from error_reporting(E_ALL &~ 2048); to error_reporting(E_ALL ^ E_STRICT); helps.
I changed the line and restarted Apache just in case. The error log is still being filled with the same messages.
Try error_reporting(0);
Same as comment #4.
Is there a pattern to the function names in the logs? I'd like to determine how many we might be talking about, which will determine the complexity of the patch.
Created attachment 622291 [details] error_log text from one web page view attempt The only pattern I see is that every line contains "... PHP Strict Standards: Non-static method [method] should not be called statically in [filename] on line ###" or "... PHP Strict Standards: Non-static method [method] should not be called statically, assuming $this from incompatible context in [filename] on line ###". I have caught the log text for one web page browse attempt: Over 2MB. I will attach it as XZ-compressed.
Try changing init.inc, starting at line 254, from $errorType = array( E_ERROR => 'Error', E_WARNING => 'Warning', E_PARSE => 'Parsing Error', E_NOTICE => 'Notice', E_CORE_ERROR => 'Core Error', E_CORE_WARNING => 'Core Warning', E_COMPILE_ERROR => 'Compile Error', E_COMPILE_WARNING => 'Compile Warning', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', /* PHP5+: E_STRICT => 'Runtime Notice' */ /* PHP5.2+: E_RECOVERABLE_ERROR => 'Catchable Fatal Error' */ ); to: $errorType = array( E_ERROR => 'Error', E_WARNING => 'Warning', E_PARSE => 'Parsing Error', E_NOTICE => 'Notice', E_CORE_ERROR => 'Core Error', E_CORE_WARNING => 'Core Warning', E_COMPILE_ERROR => 'Compile Error', E_COMPILE_WARNING => 'Compile Warning', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_STRICT => 'Runtime Notice', E_RECOVERABLE_ERROR => 'Catchable Fatal Error' );
(In reply to comment #9) > Try changing init.inc, starting at line 254, from No difference.
I found a workaround. Adding the following value to my .htaccess (which is currently empty) has stopped the strict error messages: php_value error_reporting 30719
Interesting. Do you think this should be a default?
My first suggestion would be for upstream to fix their code. If they consider G2 to be closed to development then I guess adding a .htaccess variable is the next best thing. Note that G2 does utilize the .htaccess file in some modules such as the Apache rewrite module.
Upstream is totally focused on G3 now, so I'll add this to the included htaccess.
gallery2-2.3.2-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/gallery2-2.3.2-4.fc18
gallery2-2.3.2-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/gallery2-2.3.2-4.fc17
Package gallery2-2.3.2-4.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing gallery2-2.3.2-4.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-15804/gallery2-2.3.2-4.fc18 then log in and leave karma (feedback).
gallery2-2.3.2-4.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.