Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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 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.

Replies are listed 'Best First'.
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 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024354]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-12-14 21:57 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (413 votes). Check out past polls.