httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Israel Brewster <isr...@frontierflying.com>
Subject Re: [users@httpd] Simple perl question
Date Wed, 10 Jan 2007 23:56:16 GMT
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 be  
removed, then apparently I can't run perl scripts under Apache with  
Apache chrooted, even with mod_perl running properly-is that correct?  
or do I just need to change that line to something else? On the  
brighter side, changing the LoadModule line as suggested did allow  
the config directives to load properly. Didn't help get the script to  
run 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 know how to
> run that file.
>
> On 1/10/07, Israel Brewster <israel@frontierflying.com> wrote:
>> I installed mod_perl from the package that was distributed with
>> OpenBSD 4.0. The install didn't give any errors, so I have to assume
>> it installed properly. As far as I can tell, it didn't make any
>> configuration changes. Just placing the script in my CGI directory
>> (and removing the #!/usr/bin/perl line) gives "[error] (8)Exec format
>> error: 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 on your
>> > server. Why don't you simply put your script into your cgi-bin
>> > directory?
>> >
>> > On 1/10/07, Israel Brewster <israel@frontierflying.com> 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 an OpenBSD  
>> 4.0
>> >> system, with Apache chrooted to /var/www. I have a perl script CGI
>> >> (it has the .cgi extention, not .pl, but is actually a perl  
>> script)
>> >> that I need to run. Currently, the script is written to run  
>> using the
>> >> system perl interpreter, with the first line of the script  
>> being #!/
>> >> usr/bin/perl This obviously doesn't work, since when it runs as  
>> a CGI
>> >> it is chrooted to /var/www, and can not see /usr/bin. Now I would
>> >> think that Apache should be able to run this script using the perl
>> >> module, which I have installed, but I can't seem to get it to  
>> work.
>> >> Could someone point me to something that tells me how to properly
>> >> enable/run perl scripts in Apache? I looked at mod_perl  
>> website, but
>> >> all 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' This would  
>> imply
>> >> to me that mod_perl isn't being loaded, in spite of being  
>> installed,
>> >> but that leaves me needing to know how to load the perl module.
>> >> Adding a line like LoadModule mod_perl /usr/local/lib/mod_perl.so
>> >> (which is the correct path to the mod_perl.so file) just gives  
>> me a
>> >> "Can't locate API module structure `mod_perl' in file /usr/ 
>> local/lib/
>> >> mod_perl.so: Unable to resolve symbol" What am I missing here? How
>> >> can I get Apache to run perl scripts? Thanks for any assistance  
>> that
>> >> can 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 HTTP Server
>> >> Project.
>> >> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> >>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> >> For additional commands, e-mail: users-help@httpd.apache.org
>> >>
>> >>
>> >
>> >  
>> ---------------------------------------------------------------------
>> > 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@httpd.apache.org
>> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> > For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> 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@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> 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@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message