Re: [error] Can't locate CGI.pm in @INC
On Thu, May 29, 2003 at 04:12:51PM +1000, Stas Bekman wrote: Brown, Jeffrey wrote: Problem solved! You all are a fantastic resource to newbies! Jeff -Original Message- From: Ed [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 9:28 PM To: Brown, Jeffrey; [EMAIL PROTECTED] On Wed, May 28, 2003 at 09:11:06PM -0700, Brown, Jeffrey wrote: Here are the results from the log file: [Wed May 28 20:50:21 2003] [error] No such file or directory at /htdocs/perl/first.pl line 6 during global destruction. openbsd's httpd is chrooted. Again, can someone please post a patch/addition for the troubleshooting.pod doc explaining the problem and the solution in details. I've seen this kind of questions more than once here. Should go into OpenBSD cat at: http://perl.apache.org/docs/1.0/guide/troubleshooting.html#OS_Specific_Notes Get the pod by clicking on the [src] button. For the list archive: - rtfm -u disables chroot. httpd(8) http://www.openbsd.org/faq/faq10.html#httpdchroot - set up chroot basics The doc for setting up an anoncvs mirror could be adapted for mod_perl. http://www.openbsd.org/anoncvs.shar Ofcourse much of it doesn't apply, but the part about ld.so, etc. is helpful. - List archives dreamwvr figured out how to actually get things to work and posted notes to the list. (so see archives) - 3.3-current (soon to be 3.4) And one last bit added after 3.3 was released, Revision 1.7 to apachectl: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/httpd/src/support/apachectl pick's up httpd_flags from /etc/rc.conf, so you can just add -DSSL -u to httpd_flags. - ports The openbsd ports system is not by default configured to install perl modules or packages in the chroot environment. You would have to set PREFIX or LOCALBASE. see bsd.port.mk(5) and ports(7) (PHP ports are set up for chroot installs). - goolge A nice HOWTO run mod_perl chrooted would be nice. maybe someone's already written it? I hope this helps some. Ed.
Re: [error] Can't locate CGI.pm in @INC
On Wed, 2003-05-28 at 22:39, Brown, Jeffrey wrote: [Wed May 28 19:33:57 2003] [error] Can't locate CGI.pm in @INC (@INC contains: [...] /usr/libdata/perl5/CGI.pm This sort of thing is usually a permissions problem. Try opening that file (full path to CGI.pm) from your CGI and see if it lets you. - Perrin
Re: [error] Can't locate CGI.pm in @INC
Brown, Jeffrey wrote: I have installed OpenBSD 3.2, with Apache 1.3.26, and mod_perl 1.26 which was installed as a package. I have rebooted, stopped and started apache. I have permissions of 755 on my perl scripts and here is my error log: [Wed May 28 19:33:57 2003] [error] Can't locate CGI.pm in @INC (@INC contains: /usr/local/lib/site_perl/5.6.1/i386-openbsd /usr/libdata/perl5/i386-openbsd/5.6.1 /usr/local/libdata/perl5/i386-openbsd/5.6.1 /usr/libdata/perl5 /usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/local/lib/perl5/site_perl . /var/www/ /var/www/lib/perl) at /htdocs/perl/hellothere.pl line 3 during global destruction. BEGIN failed--compilation aborted at /htdocs/perl/hellothere.pl line 3 during global destruction. global destruction? When I do a find for CGI.pm here are the results: as07# find / -name CGI.pm /usr/libdata/perl5/CGI.pm /usr/libdata/perl5/ is in @INC. Check CGI.pm perms. See that it is readable by the user that is running the server. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
RE: [error] Can't locate CGI.pm in @INC
Here are the permissions on the file: -r--r--r-- 1 root wheel 224666 Apr 28 06:35 CGI.pm The BSD OS is new to me, I am more familure with redhat...but there are some definite perks to OpenBSD and that is why I run it. Anyway wheel is the group, and Apache uses the user and group www to run the server. Any more help? Jeff -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 7:50 PM To: Brown, Jeffrey Cc: [EMAIL PROTECTED] On Wed, 2003-05-28 at 22:39, Brown, Jeffrey wrote: [Wed May 28 19:33:57 2003] [error] Can't locate CGI.pm in @INC (@INC contains: [...] /usr/libdata/perl5/CGI.pm This sort of thing is usually a permissions problem. Try opening that file (full path to CGI.pm) from your CGI and see if it lets you. - Perrin
RE: [error] Can't locate CGI.pm in @INC
On Wed, 2003-05-28 at 23:15, Brown, Jeffrey wrote: Here are the permissions on the file: -r--r--r-- 1 root wheel 224666 Apr 28 06:35 CGI.pm The BSD OS is new to me, I am more familure with redhat...but there are some definite perks to OpenBSD and that is why I run it. Anyway wheel is the group, and Apache uses the user and group www to run the server. Any more help? It could be a directory above that is the problem. Try the test I suggested and you will know for sure. - Perrin
RE: [error] Can't locate CGI.pm in @INC
Do you mean give the path in my perl script? So the line in my code: use CGI qw(:standard); would be: use /usr/libdata/perl5/CGI qw(:standard); jeff -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 7:50 PM To: Brown, Jeffrey Cc: [EMAIL PROTECTED] On Wed, 2003-05-28 at 22:39, Brown, Jeffrey wrote: [Wed May 28 19:33:57 2003] [error] Can't locate CGI.pm in @INC (@INC contains: [...] /usr/libdata/perl5/CGI.pm This sort of thing is usually a permissions problem. Try opening that file (full path to CGI.pm) from your CGI and see if it lets you. - Perrin
RE: [error] Can't locate CGI.pm in @INC
On Wed, 28 May 2003, Brown, Jeffrey wrote: Do you mean give the path in my perl script? So the line in my code: use CGI qw(:standard); would be: use /usr/libdata/perl5/CGI qw(:standard); I think what Perrin had in mind was to try, in your CGI script, something like open(FILE, '/usr/libdata/perl5/CGI.pm') or die Cannot read CGI.pm: $!; This would test if the user under which the web server is running under has permission to open CGI.pm. -- best regards, randy kobes
RE: [error] Can't locate CGI.pm in @INC
On Wed, 2003-05-28 at 23:25, Brown, Jeffrey wrote: Do you mean give the path in my perl script? So the line in my code: use CGI qw(:standard); would be: use /usr/libdata/perl5/CGI qw(:standard); Actually, what I had in mind was just this: open(CGI, '/usr/libdata/perl5/CGI.pm') or die $!; If you can't read the file, that line will die. - Perrin
Re: [error] Can't locate CGI.pm in @INC
On Wed, May 28, 2003 at 09:11:06PM -0700, Brown, Jeffrey wrote: Here are the results from the log file: [Wed May 28 20:50:21 2003] [error] No such file or directory at /htdocs/perl/first.pl line 6 during global destruction. openbsd's httpd is chrooted. Ed.
RE: [error] Can't locate CGI.pm in @INC
Problem solved! You all are a fantastic resource to newbies! Jeff -Original Message- From: Ed [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 9:28 PM To: Brown, Jeffrey; [EMAIL PROTECTED] On Wed, May 28, 2003 at 09:11:06PM -0700, Brown, Jeffrey wrote: Here are the results from the log file: [Wed May 28 20:50:21 2003] [error] No such file or directory at /htdocs/perl/first.pl line 6 during global destruction. openbsd's httpd is chrooted. Ed.
Re: [error] Can't locate CGI.pm in @INC
Brown, Jeffrey wrote: Problem solved! You all are a fantastic resource to newbies! Jeff -Original Message- From: Ed [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 9:28 PM To: Brown, Jeffrey; [EMAIL PROTECTED] On Wed, May 28, 2003 at 09:11:06PM -0700, Brown, Jeffrey wrote: Here are the results from the log file: [Wed May 28 20:50:21 2003] [error] No such file or directory at /htdocs/perl/first.pl line 6 during global destruction. openbsd's httpd is chrooted. Again, can someone please post a patch/addition for the troubleshooting.pod doc explaining the problem and the solution in details. I've seen this kind of questions more than once here. Should go into OpenBSD cat at: http://perl.apache.org/docs/1.0/guide/troubleshooting.html#OS_Specific_Notes Get the pod by clicking on the [src] button. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com