I've searched and found some references to people have strict standards errors displaying on-screen. However, I'm having an issue where the error_log file is growing very fast with errors regarding strict standards.
What file can I modify, if appropriate, to stop my error_log from growing with these errors.
Thanks
Gallery URL = http://landscapeoregon.com/gallery2/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.4.21 cgi-fcgi
Webserver = Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.0-fips mod_bwlimited/1.4
Database = mysqlt 5.1.70-cll, lock.system=flock
Toolkits = Gd
Acceleration = none/0, none/0
Operating system = Linux vps.dogpawhosting.com 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64
Default theme = matrix
gettext = disabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0
Rows in GalleryAccessMap table = 97
Rows in GalleryAccessSubscriberMap table = 129
Rows in GalleryUser table = 2
Rows in GalleryItem table = 129
Rows in GalleryAlbumItem table = 11
Rows in GalleryCacheMap table = 0
Posts: 8339
as from PHP 5.4, E_STRICT has been added to E_ALL. make sure error_reporting is setup correctly for a production server. http://galleryproject.org/node/111734
you can also set this in config.php
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 15
I appreciate your post. This one statement below makes me hesitant to even consider doing what is referenced in that post. What exactly would I be risking?
Thanks
Posts: 8339
ok, have fun w/ the HUGE error logs
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 1642
The warning was for that particular instance and was related to switching display_errors and log_errors off.
In your case, error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT in your php.ini file and rebooting php will solve your issue.
--
dakanji.com
Posts: 15
I appreciate your reply but I'm sorry I'm not finding any useful advice in there.
Posts: 15
Ah, thank you so much for your useful help.
So, is this the main php.ini file for the server? Or just for this domain/cPanel account?
Thanks so much.
Posts: 51
Hello,
I keep getting "malicious url" errors in modules/core/DownloadItem.inc. The accumulation of errors leads to huge error logs, filling up my disk space quota.
I'm not sure how to address the root cause of the problem (apart from deactivating downloads, which I'd rather not do), so I was wondering how to turn off error logging.
I found this thread, but I'm really rusty when it comes to Gallery 2, and I can't find php.ini on my installation, maybe because I have a multisite set-up.
suprsidr says I can modify config.php instead of php.ini, but I don't know what code to use exactly, or where to put it in config.php (assuming it needs to be put in a specific section).
A detailed explanation for a technically-challenged person would be very appreciated!!!
Thank you,
Ammo
Gallery URL = http://pix.alaporte.net/pub/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.21 cgi-fcgi
Webserver = Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysql 5.1.68-cll, lock.system=flock
Toolkits = ArchiveUpload, Exif, NetPBM, SquareThumb, Gd
Acceleration = full/86400, full/86400
Operating system = Linux server127.advancednetworkhosting.com 2.6.18-348.1.1.el5 #1 SMP Tue Jan 22 16:19:19 EST 2013 x86_64
Default theme = slider
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Rows in GalleryAccessMap table = 23
Rows in GalleryAccessSubscriberMap table = 13058
Rows in GalleryUser table = 3
Rows in GalleryItem table = 13056
Rows in GalleryAlbumItem table = 995
Rows in GalleryCacheMap table = 77
Posts: 1
Put this code between first <?php tag (before all copyrights info etc commented out) and first if (!isset($gallery)... tag.
@ini_set('error_reporting', 'E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT');
@ini_set('display_errors', 0);
@ini_set('log_errors', 0);
Posts: 51
Thank you!
Posts: 1642
I'll suggest that you only add the "error_reporting" line and skip the other two.
Having the three together tells PHP not to log or display ANY errors whatsoever. This can cause grief down the road.
What you want is for PHP not to log TRIVIAL errors and warnings.
The malicious url error is however unlikely to be a PHP error and is most likely a G2 error so it is unlikely that this would resolve your issue.
In future, you should create a new separate post with your issue with links to other threads you think may be relevant so as not to mix different issues together.
--
dakanji.com
Posts: 51
Thanks Dayo!