----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service INC. 5245 Airport Industrial Rd Fairbanks, AK 99709 ----------------------------------------------- On Jan 11, 2007, at 11:42 PM, Issac Goldstand wrote:
It still needs modules, etc, at the very least while Apache starts (theyare usually cached in memory once intially loaded) Issac Serge Dubrouski wrote:modperl doesn't need to have perl installed because it has it embedded. Have you tried to put your script into your /perl directory and run it using Apache::Registry? But most probably it'll have problems anyway because it'll require perl libraries: CGI, strict, etc... unless it's a really generic script. On 1/11/07, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx> wrote:On Jan 11, 2007, at 6:22 AM, Serge Dubrouski wrote:DO NOT REMOVE that #!/usr/bin/perl line. Without it OS tries to run it as a binary (ELF or whatever is appropriate for your systen ) file andof course fails.But with it, it can not find /usr/bin/perl (thanks to the chroot), and, of course, fails :-p bit of a catch 22-can't run with it, can't run without it. So after reading the various responses, as well assome additional web searching, I have gone ahead and copied /usr/ bin/perl to /var/www/usr/bin/perl so the script can see/access /usr/bin/ perl, even when chrooted. This, at least, gets rid of the cant find file/directory and invalid exec format errors. I'm still getting a "premature end of script headers" error when I try to run it though Apache, however. Running the test script as "chroot /var/www/ /cgi- bin/test.cgi" gives an "Abort trap" error. Running it normally (not chrooted) works. Obviously I do not have a proper install of perl in my chroot. Sigh. I'll keep trying. Thanks for the responses! ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service INC. 5245 Airport Industrial Rd Fairbanks, AK 99709 -----------------------------------------------On 1/10/07, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx> wrote:yeah, perl is not available at all from within the Apache chroot jail, unless I am missing something. Making the change to theLoadModule line you suggested allowed the various perl directives in the config file to load without complaint. Attempting to execute the script, however, results in a [error] (8)Exec format error: exec of / cgi-bin/perl/routers2.cgi failed This error is the same if I try witheither a .cgi extension on the file or a .pl extension ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service INC. 5245 Airport Industrial Rd Fairbanks, AK 99709 ----------------------------------------------- On Jan 10, 2007, at 4:31 PM, Serge Dubrouski wrote:So you don't have perl available at all? Then you definetely need mod_perl. Have you tried to change your LoadModule line formod_perllike I suggested erlier? On 1/10/07, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx> wrote:But with it I get a "file not found" error since it can't access /usr/bin/perl from within the chroot (/var/www). If that line can't beremoved, then apparently I can't run perl scripts under ApachewithApache chrooted, even with mod_perl running properly-is thatcorrect?or do I just need to change that line to something else? On thebrighter side, changing the LoadModule line as suggested did allowthe config directives to load properly. Didn't help get thescript torun though. ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service INC. 5245 Airport Industrial Rd Fairbanks, AK 99709 ----------------------------------------------- On Jan 10, 2007, at 2:35 PM, Serge Dubrouski wrote:Do not remove #!/usr/bin/perl line! Without it OS doesn't knowhow torun that file. On 1/10/07, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx> wrote:I installed mod_perl from the package that was distributed withOpenBSD 4.0. The install didn't give any errors, so I have toassumeit installed properly. As far as I can tell, it didn't make anyconfiguration changes. Just placing the script in my CGIdirectory(and removing the #!/usr/bin/perl line) gives "[error] (8)Execformaterror: exec of /cgi-bin/perl/routers2.pl failed". ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service INC. 5245 Airport Industrial Rd Fairbanks, AK 99709 ----------------------------------------------- On Jan 10, 2007, at 1:39 PM, Serge Dubrouski wrote:For this configuration you need to have mod_perl installed onyourserver. Why don't you simply put your script into your cgi-bindirectory? On 1/10/07, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx>wrote:I don't know if what I am trying to do here is even possible(sane?)but I thought I'd ask. I am running Apache 1.3.29 on anOpenBSD4.0system, with Apache chrooted to /var/www. I have a perlscript CGI(it has the .cgi extention, not .pl, but is actually a perlscript)that I need to run. Currently, the script is written to runusing thesystem perl interpreter, with the first line of the scriptbeing #!/usr/bin/perl This obviously doesn't work, since when itruns asa CGIit is chrooted to /var/www, and can not see /usr/bin. Now Iwouldthink that Apache should be able to run this script usingthe perlmodule, which I have installed, but I can't seem to getit towork.Could someone point me to something that tells me how toproperlyenable/run perl scripts in Apache? I looked at mod_perlwebsite, butall it says is to add a code block like the following: Alias /perl/ /home/httpd/perl/ PerlModule Apache::Registry <Location /perl> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader On </Location> which just gives me an 'Invalid command 'PerlModule' Thiswouldimplyto me that mod_perl isn't being loaded, in spite of beinginstalled,but that leaves me needing to know how to load the perlmodule.Adding a line like LoadModule mod_perl /usr/local/lib/mod_perl.so(which is the correct path to the mod_perl.so file) justgivesme a"Can't locate API module structure `mod_perl' in file /usr/local/lib/mod_perl.so: Unable to resolve symbol" What am I missinghere? Howcan I get Apache to run perl scripts? Thanks for anyassistance------------------------------------------------------------------ ---thatcan be provided ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service INC. 5245 Airport Industrial Rd Fairbanks, AK 99709 -----------------------------------------------The official User-To-User support forum of the Apache HTTPServerProject. See <URL:http://httpd.apache.org/userslist.html> for moreinfo.------------------------------------------------------------------ ---To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxxFor additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxThe official User-To-User support forum of the Apache HTTPServerProject. See <URL:http://httpd.apache.org/userslist.html> for moreinfo.To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx------------------------------------------------------------------ ---For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxThe official User-To-User support forum of the Apache HTTPServerProject.See <URL:http://httpd.apache.org/userslist.html> for more info.To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx------------------------------------------------------------------ ---For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxThe official User-To-User support forum of the Apache HTTPServer------------------------------------------------------------------ ---Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx" from the digest: users-digest- unsubscribe@xxxxxxxxxxxxxxxxFor additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx------------------------------------------------------------------ ---The official User-To-User support forum of the Apache HTTP ServerProject. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxThe official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx------------------------------------------------------------------ ---The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx------------------------------------------------------------------- --The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx-------------------------------------------------------------------- -The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx---------------------------------------------------------------------The official User-To-User support forum of the Apache HTTP Server Project.See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx