PierreForget has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
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.plMy 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
linux-gate.so.1 (0xffffe000) libperl.so => /usr/lib/perl5/CORE/libperl.so (0xb75f6000) libnsl.so.1 => /lib/libnsl.so.1 (0xb75c3000) libdl.so.2 => /lib/libdl.so.2 (0xb75be000) libm.so.6 => /lib/libm.so.6 (0xb7592000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb755e000) libutil.so.1 => /lib/libutil.so.1 (0xb755a000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7540000) libc.so.6 => /lib/libc.so.6 (0xb73bb000) /lib/ld-linux.so.2 (0xb777d000)
Library folders as root
/usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5
Library folders as chroot
/httpd/usr/local/lib/perl5 /httpd/usr/local/share/perl5 /httpd/usr/lib/perl5/vendor_perl /httpd/usr/share/perl5/vendor_perl /httpd/usr/lib/perl5 /httpd/usr/share/perl5
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?
Thank you
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl and Mysql logs
by kielstirling (Scribe) on Mar 19, 2013 at 04:01 UTC | |
by PierreForget (Acolyte) on Mar 19, 2013 at 14:11 UTC | |
by PierreForget (Acolyte) on Mar 19, 2013 at 18:30 UTC | |
by PierreForget (Acolyte) on Mar 21, 2013 at 00:10 UTC |