CGI bewilderment (fwd)

Arthur Corliss corliss at sinbad.net
Sun Jun 6 17:15:43 CDT 1999


Quick update on the DBI nonsense:

Got it working, and it turned out it was a *MySQL* permissisions problem,
nothing more.  :-P  The last place you look, eh?  The script wasn't dying
(failed compilation), since DBI was using the DynaLoader.pm, and I didn't
catch that since I had been used to 'use DBD::mysql' vice 'use DBI', and
forgot that I had been using the latter, after talking with Mike.

Anyway, the Dynaloader was loads of help with that error message, but in
DynaLoader.pm itself is this comment:

    # Many dynamic extension loading problems will appear to come from
    # this section of code: XYZ failed at line 123 of DynaLoader.pm.
    # Often these errors are actually occurring in the initialisation
    # C code of the extension XS file. Perl reports the error as being
    # in this perl code simply because this was the last perl code
	# it executed.

The error was at 169, so it wasn't an xs problem during installation, but this
code:

    my $libref = dl_load_file($file, $module->dl_load_flags) or
	    croak("Can't load '$file' for module $module: ".dl_error()."\n");

the point where it actually loads the lib.

So, what caused this?  Let me be the first to say "I'm an ass." ;-)  While
slowly trying to get my boxes security up to snuff, I inadvertantly changed
the permissions of mysql's home to 750, thinking that no one should have
access to the raw database and so on.  If I had been thinking, I would have
remembered that I had added:

	/home/mysql/lib/mysql

to /etc/ld.so.conf.  With 750, no one would be able to reference those
libraries except root or mysql.  Changing it to 751 solved that problem.

It's the little things, eh?  Can't believe that I missed that one completely,
not to mention taking two days to figure it out.  :-P  Thanks to Mike for
pointing me towards the right direction.  I hadn't thought to try those tests
as a user, especially since I could try as apache's user, with no shell and
all. . . ;-)

	--Arthur Corliss
	  Bolverk's Lair -- http://www.odinicfoundation.org/arthur/
	  "Live Free or Die, the Only Way to Live" -- NH State Motto

=================================================
Mailing list info:  If at any time you wish to (un|re)subscribe to
the list send the request to majordomo at hfb.pm.org.  All requests
should be in the body, and look like such
                  subscribe anchorage-pm-list
                  unsubscribe anchorage-pm-list



More information about the Anchorage-pm mailing list