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

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


In reply to Perl and Mysql logs by PierreForget

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.