Basically, if you run strace -o logfile program, it will run "program", logging all of it's system calls to the file "logfile". It mostly looks like incomprehensible garbage, as there are many system calls you don't care about. But you will also be able to see file accesses, in particular where apache tries to look for the library in question (search for the name of the module, you will see something like a "stat" or an "access" call foreach (@INC)). All of the system calls being made should have man pages - usually in section 2 (eg "man 2 fstat"), although you may need relevant "development" packages for your C library for this to work (the package is called manpages-dev under Debian, but could be something like libc6-dev).

If you want to trace a daemon, you should give strace a few extra options (see the man page). Replacing a call to "httpd" with "strace -fae -o /tmp/strace.$$ httpd" wouldn't be a bad call.

There are likely to be simpler ways to help with this particular problem, but in general if something is misbehaving and you don't have a clue why, strace can come to the rescue.


In reply to Re: Re: Re: Problems with environment variables. by mugwumpjism
in thread Problems with environment variables. by Anonymous Monk

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.