This is topic Linux, Apache, and mod_perl in forum Film-Yak at Film-Tech Forum ARCHIVE.


To visit this topic, use this URL:
https://ft-forum.com/ft/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic;f=8;t=003929

Posted by Dominic Espinosa (Member # 2122) on 03-05-2005, 01:19 PM:
 
Okay, I'm not sure how many of you fellow geeks are into Linux but here's my problem anyway:

I've got a box running RedHat Linux 7.1 (Seawolf). I've got it set up as a router for the lil' lady's network. Trouble is I have custom scripts to serve wallpaper and a few other little gadgets to the desktop and xbox.
Well, all of a sudden (and I think updating perl did it) httpd died and left it's PID file behind.
Attempts to restart it fail with the following output:
[root@server /root]# service httpd start
Starting httpd: [Sat Mar 5 03:13:24 2005] [error] Can't locate strict.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . /etc/httpd/ /etc/httpd/lib/perl) at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache.pm line 3.!BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache.pm line 3.!Compilation failed in require at (eval 1) line 3.!
[FAILED]

How's that for strange? Everywhere I've looked it's usually because of a certain "hack" in which the perl lib's are actually an nfs share mounted from another machine and for whatever reason becomes unavailable because the connection drops or whatever leaving behind an empty directory.
In my case however everything is local, perl still functions, and strict.pm is exactly where it should be.

Well, in the mean time mod_perl disabled let's it start...strange.
 
Posted by Mike Williams (Member # 1140) on 03-05-2005, 05:34 PM:
 
It might be a file permissions issue. If you are not to worried about security, you can type CHMOD 777 strict.pm. I think that opens it up for everyone so it would rule out a permissions issue.
 
Posted by Dean Kollet (Member # 1789) on 03-05-2005, 05:50 PM:
 
um...I have to look into is as I haven't run scripts in a while, but you should at least upgrade your version of Linux. Which Kernel are you using?
 
Posted by Scott Norwood (Member # 30) on 03-05-2005, 10:40 PM:
 
Do you have multiple versions of Perl on that machine?

Redhat 7.1 is definitely outdated. 7.3 is serviceable with patches.

Personally, I'd recommend Slackware or Free/Open/NetBSD.
 
Posted by John Hawkinson (Member # 1135) on 03-06-2005, 01:56 AM:
 
"chmod 777" is a poor idea. It makes a file world-WRITABLE.
"chmod a+r" would be fine, but shouldn't be necessary since it should already be world-readable (a+r basically OR's in 0222 into the file modes, so a mode 0600 would become 0622, etc.).

As for your actual problem, well, err, is strict.pm indeed in one of the directories in @INC? If not, there's your problem. Otherwise, your problem is really strange and perhaps you should try strace or something.

--jhawk
 
Posted by Dominic Espinosa (Member # 2122) on 03-06-2005, 03:06 AM:
 
Back from the warfront...

Permissions are just fine, it's already world readable.
Turns out running up2date perl (I can't remember why I did it...I think I was installing some other module) caused the "glitch".
However after simply copying strict.pm from the newer library dir into the old one (I was too lazy to update @INC, but I guess I will if I ever need mod_perl again) it stopped complaining about strict.pm and started about Dynaloader.pm...

As for my resoning for using such an inferior o/s...
When I got into linux I started with Redhat 6.2 and ended up getting used to it, I've just not had the time since to get into any other version.
I've diddled with slackware a little but not enough to feel comfortable in using it on my router.
As for the kernel, I'm running stock kernel on it.
I'm not too woried about security right now on it, my ipchains ruleset on that box is pretty strict and I do check logs.
One of these days I'll upgrade the kernel, but right now I just have too much going on.

Anyhow, disabling mod_perl in the httpd.conf file took care of it and my regular perl cgi's still run just fine so I guess that's the work around.

And on an unrelated note...why do idiots drive behind me on saturday night?
 




Powered by Infopop Corporation
UBB.classicTM 6.3.1.2