Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
"be consistent"
 
PerlMonks  

Re^3: Perl and Mysql logs

by PierreForget (Initiate)
on Mar 19, 2013 at 18:30 UTC ( #1024354=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Perl and Mysql logs
in thread Perl and Mysql logs

Hi, I found something new.

I finally found where Apache is sending the Mysql logs. It is sending it directly to the main Apache logs, instead of the local vhost logs, although the directive in httpd.conf is local:

Errorlog "/httpd/restaurant-quebec/logs/error_log"

Here is the log in /httpd/usr/local/apache2/logs

DBD::mysql::st execute failed: Unknown column 'clientpreno' in 'field +list' at testerreur.pl line 22.

So, it's not a Perl problem, but an Apache problem. I will continue my search and I will post the results once I find the issue, so that people who search for the same problem will have a solution.

Thanks to everybody who took the time to read and reply.


Comment on Re^3: Perl and Mysql logs
Select or Download Code
Re^4: Perl and Mysql logs
by PierreForget (Initiate) on Mar 21, 2013 at 00:10 UTC

    Hi everybody,

    I finally found the solution. In Apache, the newer version with "event" threading has the side-effect of logging everything in the main server log file. It seems to be that the errors are sent to stderr and stderr can only be redirected to the main server error log file.

    The workaround that was suggested to me in the mail-archives.apache.org was to recompile with the following switches (added to all the other switches I used):

    --with-mpm=prefork --enable-cgi

    Making sure I was using mod_cgi instead of mod_cgid in the modules section of httpd.conf

    If you look in the Apache documents, it tells you that the error log is redirected to the vhost file if the line exist in the vhost section:

    ErrorLog "/httpd/domainname/logs/error_log"

    But that is not true if you use mod_cgid. Only true if you use mod_cgi.

    Quite funny that you have to revert to older ways to get back your logs in the right place.

    Hope this help other people with the same problem.

    Thanks again to all the people who took the time to read or respond.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-04-17 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (439 votes), past polls