HowTo Enable Reporting of PHP Errors and Warnings using Apache

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Forum rules
Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby tcp » Tue Mar 27, 2007 4:00 pm

Overview

This thread introduces some basic tips about configuring PHP and Apache to give useful information about Joomla bugs.  Most installations of Apache and PHP will not, by default, give this information, but this can easily be changed.  Why enable reporting?  Because this information will indicate where PHP found a problem and helps us resolve the cause of the problem.

Your Current Settings

You may have error logging already.  To check using Joomla!1.5 , in the administrator application select Help -> System Info.  On the submenu, select PHP Information and search for error_log, error_reporting, and display_errors .  Both the local and global settings are show, but it is the local settings that matter when working with Joomla.  You should also note the Configuration File (php.ini) Path for future reference.

How to Change the Settings

As with anything there are many ways to enable PHP reporting of errors and warnings, and the tips below represent the way that I like to work.  Suggestions are welcomed.

Using Apache's 2.0 virtual hosting I have several sites on my local system, each with their own log files.  With these settings, all PHP errors are both displayed and logged to a file.  The php_flag and php_value directives can also be placed in an .htaccess file if the webserver permits the overriding of options.

Code: Select all

<VirtualHost *:80>
    ServerName joomla
    DocumentRoot /var/www/domains/joomla/html
    ErrorLog /var/www/domains/joomla/error_log
    CustomLog /var/www/domains/joomla/access_log common
    php_flag display_errors on
    php_value error_reporting 6143
    php_flag log_errors on
    php_value error_log /var/www/domains/joomla/php_log
</VirtualHost>


One can also enable these settings in the php.ini file.

Code: Select all

error_reporting  =  E_ALL
;error_reporting  =  E_ERROR
display_errors = On
;display_errors = Off
... and so on


If you are working on your own computer ( localhost ), then changing the Apache or PHP configurations may be as simple as opening the configuration file, making the changes, saving, and restarting the webserver.  Otherwise, you may or may not be able to make these changes depending on your hosting service, and you may want to contact their support team for advice.  You may still be able to enable error reporting using an .htaccess file.

Watching the Log File

The log file can easily be watched using a utility called tail which comes natively with most *nix distributions, including Linux and Mac OS X.  Windows users will need to install this utility ( cygwin or unxutils ).  When used, the PHP log file will look something like this:

Toby-Patterson:html $  tail -f /var/www/domains/joomla/php_log &
[27-Mar-2007 22:36:35] PHP Notice:  Trying to get property of non-object in /private/var/www/domains/joomla/html/components/com_content/helpers/content.php on line 347
[27-Mar-2007 22:36:35] PHP Notice:  Trying to get property of non-object in /private/var/www/domains/joomla/html/components/com_content/helpers/content.php on line 339


This information is incredibly useful to developers because it indicates exactly where PHP detected a problem.  Not all problems will result with additional entries in the log file ( poor code logic, JavaScript/Browser issues ), but most will.

Resources

PHP Configuration References:
http://www.php.net/manual/en/configuration.changes.php
http://www.php.net/manual/en/ini.php#ini.list
http://www.php.net/error_reporting
http://www.php.net/manual/en/ref.errorfunc.php

Apache Configuration References:
http://forum.joomla.org/index.php?topic=79277.0
http://httpd.apache.org/docs/2.0/mod/co ... owoverride

Utility References:
http://www.cygwin.com/
http://unxutils.sourceforge.net/

Final Thoughts

Again, this is merely an introduction and suggestions are welcomed.

Happy Debugging,

tcp

Note to moderators: Please feel free to edit this post with additional suggestions or links.

--edit March 28th - links to cygwin and unxutils
Last edited by tcp on Thu Mar 29, 2007 2:54 pm, edited 1 time in total.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

diri
Joomla! Guru
Joomla! Guru
Posts: 702
Joined: Wed Sep 21, 2005 9:27 am
Location: Somewhere

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby diri » Tue Mar 27, 2007 4:35 pm

cygwin is your friend in case of running some windish environment to get tools like tail. AFAIR at sourceforge one can find binaries only at mingw or similar packages.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby friesengeist » Wed Mar 28, 2007 11:47 am

diri wrote:cygwin is your friend in case of running some windish environment to get tools like tail. AFAIR at sourceforge one can find binaries only at mingw or similar packages.


Native win32 port of "tail" and many others:
http://unxutils.sourceforge.net/ :)
We may not be able to control the wind, but we can always adjust our sails

diri
Joomla! Guru
Joomla! Guru
Posts: 702
Joined: Wed Sep 21, 2005 9:27 am
Location: Somewhere

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby diri » Tue Apr 10, 2007 5:39 am

An addition to make testing more comfortable while having multiple incarnations of Joomla! running on standalone machines or same server in LAN and behind a router being capable to support services like dyndns:

Most easy way to introduce name of a server in LAN is to use a local DNS. For small LANs and standalone machines this might be to much. "hosts" file is of help very much than.

Example hosts file to make one or more virtual hosts accessable with names:

Code: Select all

127.0.0.1 localhost joomla joomla2 joomla3
192.168.1.200 joomla.mylan.net joomla2.mylan.net joomla3.mylan.net


In Apache's configuration of virtual hosts:

Code: Select all

<VirtualHost *:80>
    ServerName joomla
    ServerAlias joomla.mylan.net
    DocumentRoot /var/www/domains/joomla/html
    ErrorLog /var/www/domains/joomla/error_log
    CustomLog /var/www/domains/joomla/access_log common
    php_flag display_errors on
    php_value error_reporting 6143
    php_flag log_errors on
    php_value error_log /var/www/domains/joomla/php_log
</VirtualHost>
<VirtualHost *:80>
    ServerName joomla2
    ServerAlias joomla2.mylan.net
    DocumentRoot /var/www/domains/joomla/html
    ErrorLog /var/www/domains/joomla2/error_log
    CustomLog /var/www/domains/joomla2/access_log common
    php_flag display_errors on
    php_value error_reporting 6143
    php_flag log_errors on
    php_value error_log /var/www/domains/joomla2/php_log
</VirtualHost>
<VirtualHost *:80>
    ServerName joomla3
    ServerAlias joomla3.mylan.net
    DocumentRoot /var/www/domains/joomla3/html
    ErrorLog /var/www/domains/joomla3/error_log
    CustomLog /var/www/domains/joomla3/access_log common
    php_flag display_errors on
    php_value error_reporting 6143
    php_flag log_errors on
    php_value error_log /var/www/domains/joomla3/php_log
</VirtualHost>


To make it accesable via dyndns and the like add a ServerAlias for each virtual host which should be accessable via internet. At this service provider one needs an entry for each hostname which should be connectable.

hth.
Last edited by diri on Tue Apr 10, 2007 6:11 am, edited 1 time in total.

User avatar
micheas
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Sat Sep 03, 2005 10:54 am
Location: San Francisco, CA
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby micheas » Mon Jun 11, 2007 6:54 am

Note that you can have more than one ServerAlias per virtual host.

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby CirTap » Fri Jul 06, 2007 7:37 pm

Hi,

in order for php_value and php_flag to work as intended (VirtualHost, .htaccess) PHP must run as the server module. The CGI version, which is used by the majority of ISPs, won't notice any of this.
Editing PHP.INI is usually prohibited in a shared environment, so it's not an option for many ppl.

However, any of PHP's error_* settings can also be set at runtime via script using ini_set() -- provided this function wasn't disabled (some ISPs believe this is a dangerous function and disable it in the configuration).

- display_errors
- display_startup_errors (only works in script if used in a "prepend_script")
- error_append_string
- error_log
- error_prepend_string
- error_reporting

Any php setting declared as PHP_INI_ALL may be changed in script: Appendix G. php.ini directives, see table H.2 at the end, and runtime settings

CirTap
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

RonVA
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Wed Sep 05, 2007 4:22 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby RonVA » Tue Sep 25, 2007 11:53 am

It would be nice to include a guide on how to report a Joomla error. I guess there must be a structured way to do so. I want to report an 1.5 bug I just ran into but can't seam to figure out how. Maybe it's already solved so is there a repository somewhere to search?

Ron

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby CirTap » Thu Sep 27, 2007 10:18 am

RonVA wrote:It would be nice to include a guide on how to report a Joomla error. I guess there must be a structured way to do so. I want to report an 1.5 bug I just ran into but can't seam to figure out how. Maybe it's already solved so is there a repository somewhere to search?

Ron

right over there: http://forum.joomla.org/index.php/board,179.0.html
there are a bunch of stickies explaining how and where.

CirTap
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

RonVA
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Wed Sep 05, 2007 4:22 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby RonVA » Fri Sep 28, 2007 3:25 pm

Hi CirTab,

You are pointing me to a subforum of 'Archived Boards - All boards closed'. Not a place where you would expect a bug report forum... Also 'Quality and Testing - Locked and Archived' sounds as if you cannot post there. A sticky note on this forum points to the Joomla! Developerforge to submit bugs but one has to be a registered developer to do so!

As a beginning Joomla-er (and as an experienced developer) I really think that bug reporting should be made much more accessible!  The 'Quality and Testing - Locked and Archived' has only around 30 subjects posted in 6 months. With so few bugreports it will take ages to reach a stable version. Maybe (hopefully) I'm overlooking something...

Ron

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby CirTap » Sat Sep 29, 2007 2:50 pm

Hi,

when I posted the link the forums were still open :)
It just happend that some Working Groups were closed. Although bug reports have been posted in that forum they were usually moved to the appropriate WG forum (dev, translatiion, docs, whatever). It has been merily an entry point rather than the archive of anything that went wrong in the last two years.
With so few bugreports it will take ages to reach a stable version.
don't worry, there have been more bug reports than you'd want to know about, so yes: you are overlooking something

I'm not sure if one (still) needs an account at JoomlaCode to add an item to the bug tracker -- which is the primary place to report bugs anyway ;) http://joomlacode.org/gf/project/joomla/tracker/
You may find all the "many bugs" you were looking for, not sure though if it will "take ages" until they're fixed.

Have fun,
CirTap
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

RonVA
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Wed Sep 05, 2007 4:22 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby RonVA » Mon Oct 01, 2007 5:45 pm

Thanks Cirtap,

Yes, one has to register before submitting. Still think this is way to difficult to find for average users and most users won't take the time to register etc. I do think an easy to find simple bug reporter should be available, moderated by someone who can do the structured bug reporting in the bug tracker (and prevent the same bugs being tracked).

Ron

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apache

Postby CirTap » Tue Oct 02, 2007 2:36 pm

RonVA wrote:Still think this is way to difficult to find for average users and most users won't take the time to register etc. I do think an easy to find simple bug reporter should be available

well, why not use this very forum then?
there's a "bug tracker template" available as a sticky. copy that text into a new post and add your findings.

CirTap
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

User avatar
dpk
Joomla! Explorer
Joomla! Explorer
Posts: 491
Joined: Mon May 15, 2006 2:21 am
Location: The magical land of Iowa
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apac

Postby dpk » Sun Feb 15, 2009 8:49 pm

it should be emphasized in this thread that it's GOOD SECURITY PRACTICE to take steps to make your error logs non-obvious and restricted or to just cut off all error reporting except when you need it.
On the web since 1995. 495 posts in the old Mambo forum. Under the hood with Wordpress, Joomla, and Drupal since 2006. Many more platforms before and since.

http://www.newlocalmedia.com
http://www.twitter.com/newlocalmedia

User avatar
micheas
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Sat Sep 03, 2005 10:54 am
Location: San Francisco, CA
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apac

Postby micheas » Sun Feb 15, 2009 10:15 pm

While there are various reasons to disable logging, security is not one of them.

Protect your logs from access by any but those that need to read them.

Check your logs daily. (You probably want to have a few automated test emailed to you, like length of log files, Geocode of the computers that have accessed your webserver, 404 errors (url and total number), 500 errors (url and total number of times.) plus anything that is relevant to your site.

Security is partially reactive, and if you don't have logs, you are reacting without information.

User avatar
dpk
Joomla! Explorer
Joomla! Explorer
Posts: 491
Joined: Mon May 15, 2006 2:21 am
Location: The magical land of Iowa
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using Apac

Postby dpk » Sun Feb 15, 2009 10:41 pm

This is not about ACCESS logs, it is about ERROR logs, specifically PHP error logs, which are a rich source of information for crackers.

I would say the maximum preventative security measure with error logs is to shut down all error logging completely in situations where those logs are not going to be used or monitored. If you need that information, use them. If you don't need it, producing it and leaving it on the server makes it available for 1) nobody (which is pointless), or 2) someone who shouldn't see it (which is bad for you).

At a minimum, knock down the verbosity of the reporting, use unconventional folder/filenames for the logs, and lock down their permissions.

Aside from PHP error logs, Joomla and its extensions can also generate error log files. Same suggestions on those:
http://docs.joomla.org/Security_Checkli ... _and_files
On the web since 1995. 495 posts in the old Mambo forum. Under the hood with Wordpress, Joomla, and Drupal since 2006. Many more platforms before and since.

http://www.newlocalmedia.com
http://www.twitter.com/newlocalmedia

zimhosts
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 17, 2011 10:02 am

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby zimhosts » Thu Mar 17, 2011 10:14 am

Im not so sure if lm posting this in the right place and please do forgive me. I have a 1.5 template that lm using for my website and everythingvwirks well but the only problem is that it does not report syfstem information eg if u sign up as a new member, that default message in blue that tells you that your activation link has been sent, does not sdisplay at all. When l interchange the template the message appears. This is tje case with all general system messages including when for instance l use this mail sending component. If there is an error in the component, that typical blue msg doesnt appear with this template unless l substitute it. I believe this must be the template issue but l dont want to change it. Is there anything l myt need to type into tje template files? Please help as lm so stranded now. Hope to hear from you soon. Thank you

stevenheron
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sun May 29, 2011 11:26 am

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby stevenheron » Fri Jul 08, 2011 4:53 am

zimhosts wrote:Im not so sure if lm posting this in the right place and please do forgive me. I have a 1.5 template that lm using for my website and everythingvwirks well but the only problem is that it does not report syfstem information eg if u sign up as a new member, that default message in blue that tells you that your activation link has been sent, does not sdisplay at all. When l interchange the template the message appears. This is tje case with all general system messages including when for instance l use this mail sending component. If there is an error in the component, that typical blue msg doesnt appear with this template unless l substitute it. I believe this must be the template issue but l dont want to change it. Is there anything l myt need to type into tje template files? Please help as lm so stranded now. Hope to hear from you soon. Thank you


Try using jdoc

Code: Select all

<jdoc:include type="message" />

vb_reader
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 04, 2009 2:21 pm
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby vb_reader » Wed Sep 07, 2011 6:52 am

diri wrote:An addition to make testing more comfortable while having multiple incarnations of Joomla! running on standalone machines or same server in LAN and behind a router being capable to support services like dyndns:

Most easy way to introduce name of a server in LAN is to use a local DNS. For small LANs and standalone machines this might be to much. "hosts" file is of help very much than.

Example hosts file to make one or more virtual hosts accessable with names:

Code: Select all

127.0.0.1 localhost joomla joomla2 joomla3
192.168.1.200 joomla.mylan.net joomla2.mylan.net joomla3.mylan.net



That is really a good tip for me. This reduces lots work working on internal networks.

User avatar
allen012087
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Wed Feb 23, 2011 4:21 am
Location: Coimbatore, India
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby allen012087 » Thu Sep 15, 2011 6:12 am

i have enabled the error reporting to the maximum and under the footer i get a large section of codes i can see., all these are errors?
•Profile Information•
....

•Memory Usage•
....
•20 queries logged.•
...
•0 legacy queries logged.•

•Language Files Loaded•
....
•Untranslated Strings Diagnostic•

•None•

•Untranslated Strings Designer•

•None•


all under these headings are errors? is it similar to logs or different? do i need to know codes to understand them and fix it or is there any software tools available to fix them? thanks

laura_abc
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Fri Oct 21, 2011 8:48 am

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby laura_abc » Fri Oct 21, 2011 11:10 am

thaanks, it was a very-very big help also for us! :laugh:

i'm glad to find this!
Signature rules: viewtopic.php?f=8&t=65

sh4n0n
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Dec 13, 2011 3:32 pm
Location: Canada
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby sh4n0n » Tue Dec 13, 2011 3:39 pm

looking for this since quiet a long time, comes in handy!
thanks for writing it up! :)
Image

regards,
shanon

Concha_Enferma
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Tue Dec 20, 2011 1:58 am

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby Concha_Enferma » Tue Dec 20, 2011 2:18 am

zimhosts wrote:Im not so sure if lm posting this in the right place and please do forgive me. I have a 1.5 template that lm using for my website and everythingvwirks well but the only problem is that it does not report syfstem information eg if u sign up as a new member, that default message in blue that tells you that your activation link has been sent, does not sdisplay at all. When l interchange the template the message appears. This is tje case with all general system messages including when for instance l use this mail sending component. If there is an error in the component, that typical blue msg doesnt appear with this template unless l substitute it. I believe this must be the template issue but l dont want to change it. Is there anything l myt need to type into tje template files? Please help as lm so stranded now. Hope to hear from you soon. Thank you


You might have to also add the rest of the code, like this

Code: Select all

<?php if ($this->getBuffer('message')) : ?>
<div class="info"> <jdoc:include type="message" /> </div>
<?php endif; ?>

See if that works, otherwise send me a PM and I'll see if we can work it out together.

Fonias
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Mon Nov 16, 2009 1:19 am
Location: Ελλάδα
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby Fonias » Tue Dec 27, 2011 5:08 am

You can't imagine how happy you make me now! I was looking for a workaround but didn't find anything else except of this!

Thank you and have a Happy New Year!

ronaldwilli
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Tue Jan 03, 2012 6:39 pm
Location: Tirunelveli
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby ronaldwilli » Tue Jan 03, 2012 6:42 pm

Concha_Enferma wrote:
zimhosts wrote:Im not so sure if lm posting this in the right place and please do forgive me. I have a 1.5 template that lm using for my website and everythingvwirks well but the only problem is that it does not report syfstem information eg if u sign up as a new member, that default message in blue that tells you that your activation link has been sent, does not sdisplay at all. When l interchange the template the message appears. This is tje case with all general system messages including when for instance l use this mail sending component. If there is an error in the component, that typical blue msg doesnt appear with this template unless l substitute it. I believe this must be the template issue but l dont want to change it. Is there anything l myt need to type into tje template files? Please help as lm so stranded now. Hope to hear from you soon. Thank you


You might have to also add the rest of the code, like this

Code: Select all

<?php if ($this->getBuffer('message')) : ?>
<div class="info"> <jdoc:include type="message" /> </div>
<?php endif; ?>

See if that works, otherwise send me a PM and I'll see if we can work it out together.

Ok I have tried the above and yes it does work. However after this change my page looks little misaligned. Should I need to make anymore changes.

Thank you so much for helping.

ronaldwilli
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Tue Jan 03, 2012 6:39 pm
Location: Tirunelveli
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby ronaldwilli » Mon Jan 16, 2012 5:44 pm

OK the misalignment fixed. It is the problem with my old browser MSIE at the workplace. Now in home i am working on IE9 and it displays in proper alignment.

Thank you for the great responses helped me out.

raghavmitra
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sat Jan 28, 2012 8:55 am

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby raghavmitra » Sat Jan 28, 2012 9:07 am

ronaldwilli wrote:OK the misalignment fixed. It is the problem with my old browser MSIE at the workplace. Now in home i am working on IE9 and it displays in proper alignment.

Thank you for the great responses helped me out.


Do you really think this thread concerns alignment problems in joomla? :-\
Read the full thread before posting buddy.

@tcp , thanks that really helped a lot. ;)

stevegd
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sun Feb 05, 2012 12:45 pm
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby stevegd » Sun Feb 05, 2012 1:10 pm

my webserver log file was full of huge chunks of php errors about 20Mb worth in 3 days alone. I reported this to my developer who after viewing my php info details pointed out that my php error_log value is set to 6154 what is this value? will a lower value supress some of the error logs? I dont want to turn off php error logging completley

louisjunwe
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Feb 23, 2012 5:08 pm
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby louisjunwe » Fri Feb 24, 2012 1:34 pm

Glad to find the useful info about Apache Configuration & Utility References, thanks for sharing these useful sites.

tittbit
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun Mar 11, 2012 7:55 am
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby tittbit » Sun Mar 11, 2012 8:08 am

stevegd wrote:my webserver log file was full of huge chunks of php errors about 20Mb worth in 3 days alone. I reported this to my developer who after viewing my php info details pointed out that my php error_log value is set to 6154 what is this value? will a lower value supress some of the error logs? I dont want to turn off php error logging completley


for that you can set a cron job to delete log files

for your referenece you can use following cron command

find /public_html/error/ -type f -mtime +10 -name "*.log" | xargs rm -f > /public_html/error/purgelog.txt


assuming that log file is in directory "error"under public_html folder and log file name is purgelog.txt

aakashdavis
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Apr 21, 2012 3:19 am
Location: India
Contact:

Re: HowTo Enable Reporting of PHP Errors and Warnings using

Postby aakashdavis » Sat Apr 21, 2012 4:06 am

Nice thread got some really wonderful resources here. Thanks all
~Aakash
A computer once beat me at chess, but it was no match for me at kick boxing
http://akashtablet.in/
Moving http://aadhaaruid.org/ from WP to Joomla


Return to “Joomla! 1.5 Bug Reporting”

Who is online

Users browsing this forum: No registered users and 5 guests