Bug 863429 - Apache logs are growing to gigabytes in size
Apache logs are growing to gigabytes in size
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gallery2 (Show other bugs)
17
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-05 09:07 EDT by Michael Cronenworth
Modified: 2012-12-20 11:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 11:00:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
php.ini (67.48 KB, text/plain)
2012-10-05 11:17 EDT, Michael Cronenworth
no flags Details
error_log text from one web page view attempt (11.57 KB, application/x-xz)
2012-10-05 12:17 EDT, Michael Cronenworth
no flags Details

  None (edit)
Description Michael Cronenworth 2012-10-05 09:07:15 EDT
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
Comment 1 Gwyn Ciesla 2012-10-05 10:56:45 EDT
Do you have any custom php.ini settings or gallery2 configs set?  Like Strict?
Comment 2 Michael Cronenworth 2012-10-05 11:17:25 EDT
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.
Comment 3 Gwyn Ciesla 2012-10-05 11:27:17 EDT
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.
Comment 4 Michael Cronenworth 2012-10-05 11:36:15 EDT
I changed the line and restarted Apache just in case. The error log is still being filled with the same messages.
Comment 5 Gwyn Ciesla 2012-10-05 11:39:37 EDT
Try

error_reporting(0);
Comment 6 Michael Cronenworth 2012-10-05 11:42:12 EDT
Same as comment #4.
Comment 7 Gwyn Ciesla 2012-10-05 11:55:17 EDT
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.
Comment 8 Michael Cronenworth 2012-10-05 12:17:52 EDT
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.
Comment 9 Gwyn Ciesla 2012-10-05 12:21:54 EDT
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'
        );
Comment 10 Michael Cronenworth 2012-10-05 12:27:35 EDT
(In reply to comment #9)
> Try changing init.inc, starting at line 254, from

No difference.
Comment 11 Michael Cronenworth 2012-10-08 22:08:43 EDT
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
Comment 12 Gwyn Ciesla 2012-10-09 13:08:33 EDT
Interesting.  Do you think this should be a default?
Comment 13 Michael Cronenworth 2012-10-09 15:52:28 EDT
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.
Comment 14 Gwyn Ciesla 2012-10-10 08:39:34 EDT
Upstream is totally focused on G3 now, so I'll add this to the included htaccess.
Comment 15 Fedora Update System 2012-10-10 08:55:58 EDT
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
Comment 16 Fedora Update System 2012-10-10 08:56:08 EDT
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
Comment 17 Fedora Update System 2012-10-10 14:06:54 EDT
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).
Comment 18 Fedora Update System 2012-12-20 11:00:04 EST
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.

Note You need to log in before you can comment on or make changes to this bug.