|Do you know where your variables are?|
Perl and Mysql logsby PierreForget (Initiate)
|on Mar 18, 2013 at 23:09 UTC||Need Help??|
PierreForget has asked for the
wisdom of the Perl Monks concerning the following question:
I am reinstalling a web server for the n'th time and as usual, all the software have change paramaters and use. Which I understand, for the sake of security and ease of use (Ha!Ha!...)
Installation is Slackware 14.0 with Perl 5.16.1, Apache 2.4.3 (with suexec functional), vhost, and all under a chroot (under /httpd).
I use the Perl install from Slackware, reinstalled Apache, sendmail, etc.
I have a hard core preference for Slackware, because I prefer to install and see what is happening. I am not very found of Yum types of installs. I know it's convenient for other people (and I use it on Centos machines), but I prefer the old way...
I need to see the logs in each of the vhost logs and Apache is doing it for me correctly. Example: Logs go to: /httpd/domainname/logs/error_log
If I use a Perl script (with a voluntary error), which is in a vhost, directly from the command line as root, I get the normal error log (this is what I need):DBD::mysql::st execute failed: Unknown column 'clientpreno' in 'field list' at /httpd/domainname/cgi/testerreur.pl line 22.
If I do it from a browser, I see no error message from the same script in the logs of the vhost. Although, if I make a Perl critical error, I get:[Mon Mar 18 13:40:36.217614 2013] [cgid:error] [pid 27555:tid 2855271232] [client xxx.xxx.245.237:49669] End of script output before headers: testerreur.pl
My other servers behave correctly, but they are running with older versions of all the software.
Pretty difficult to debug Mysql when you don't have logs. For me, logs is everything...
Please note that I am using the -w switch in the Perl script. I also tried use warnings:, but to no avail.
I made sure that all the libraries are under the chroot.
Results of ldd
Library folders as root
Library folders as chroot
If I make chroot /httpd /usr/bin/instmodsh, I get 64 modules installed. If I make /usr/bin/instmodsh, I get 209 modules installed. Am I missing something here?
I usually find it by myself, but I've been searching the Internet and didn't find anything valuable. Any idea where I can start searching?