Shaughnessy, Ian Ian_Shaughnessy at
Wed Aug 15 05:36:19 CDT 2001

What webserver are you running?  And generally crawling around doesnt make a
webserver too happy.. it runs as the user nobody (I'm assuming), so if it
tries to enter a directory that does not have rwxr-xr-x permissions, it
cant.  Try this:

su nobody
cd /www/karic/clientone

Check the output.  I'm pretty sure youre going to see perl spit back a
permissions problem.  This is just a handy way of debugging a cgi script
too, heh, you dont know how many times I've had a script not work because of
a permissions problem that I didnt realize until I executed it as manually
as user nobody (or whatever user the webserver runs as).

Also, in case you havent used require much... make sure the require'd file
ends with a '1;'.  Otherwise require dumps to an error (has to do with
return values).  I think its silly, but I guess I'm not Alan Cox.  ;)  


-----Original Message-----
From: Kari Chisholm
To: Portland Perl Mongers
Sent: 8/14/01 5:21 PM
Subject: require

Howdy all--

This may be a moron question, but I can't seem to get it to work.

I've got two CGI's

that really live on my server here


I want each of them to read in subroutines and settings from a single


So, in each of those two cgi's I've got this line

	require ("/www/karic/mystuff/global.cgi");

I can't find any documentation that says I can crawl around my file
server like
this using require, but nothing that says I can't either.

Nonetheless, I'm getting a server error.  Is this a problem with my
perl, or
with my server?

Any thoughts?


p.s. I couldn't get it to work with DO or USE either, though I know much
about those.

More information about the Pdx-pm-list mailing list