Ask a Question related to PERL Modules, Design and Development.
-
Eric R. Meyers #1
Problems with Apache 2.0, mod_perl2 and perl
I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
perl 5.8.8
httpd 2.0.54-10.3
mod_perl 2.0.1-1.fc4
1. If I add the load mod_perl in the perl.conf, the service httpd start
dies.
a) Nothing about the death of httpd in the error_log.
2. I can only get a statically linked perl to run.
a) /usr/bin/perl: error while loading shared libraries: libperl.so:
cannot open shared object file: Permission denied
3. When I try to run a simple CGI.pm program under Apache, with the static
perl, the perl can't find CGI.pm in the @INC paths. Of course, the
script works just fine from the command line.
a) The @INC is correct as shown in the error_log, and CGI.pm didn't
relocate.
Anybody got a clue?
Thanks,
Eric
Eric R. Meyers Guest
-
Mason Mod_Perl2.0 Apache 2.0 Fedora Core 1 AMD64 - HOW I DID IT! -
Here's how I got Mason to work with Apache 2.0 In short, 1. get Mason 2. get libapreq2-2.04-dev 3. get mod_perl-2.0-current.tar.gz -
apache::dbi & mod_perl2
Hello, Can I still use apache::dbi with apache2/mod_perl2 ?? (it is not in the list of the ported module yet) Should I use something else for... -
perl and/und apache
attempt to invoke directory as script: c:/foxserv/www/cgi-bin This is standing in error.log Apache. Das steht in error.log Apache. And I get:... -
mod_php 4.3.2 (w/ apache 2.0.40 using apache filters) - problems loading extensions
(cross posted from php.install in hopes of increasing my chances of finding help) I've been trying to get php working on our RH8 box using a... -
#13024 [Com]: Problems with PHP on Apache .. when loading php script a few times Apache crash
ID: 13024 Comment by: javri28 at hotmail dot com Reported By: j_barrancos at hotmail dot com Status: Bogus Bug... -
John Bokma #2
Re: Problems with Apache 2.0, mod_perl2 and perl
"Eric R. Meyers" <ermeyers@adelphia.net> wrote:
Is perl allowed to access the CGI.pm file?> 3. When I try to run a simple CGI.pm program under Apache, with the
> static
> perl, the perl can't find CGI.pm in the @INC paths. Of course, the
> script works just fine from the command line.
>
> a) The @INC is correct as shown in the error_log, and CGI.pm
> didn't
> relocate.
>
> Anybody got a clue?
Try a simple CGI script that does something like:
print "Content-type: text/plain\n\n";
unless ( open my $fh, "/path/to/CGI.pm" ) {
print "Can't open CGI.pm for reading: $!\n";
exit;
}
print "Could open CGI.pm for reading\n";
I guess you'll get the Can't one.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: [url]http://castleamber.com/[/url]
John Bokma Guest
-
Eric R. Meyers #3
Re: Problems with Apache 2.0, mod_perl2 and perl
John Bokma wrote:
# cat ./helloworld.cgi> print "Content-type: text/plain\n\n";
>
> unless ( open my $fh, "/path/to/CGI.pm" ) {
>
> print "Can't open CGI.pm for reading: $!\n";
> exit;
> }
>
> print "Could open CGI.pm for reading\n";
>
#!/usr/bin/perl_static -wT
##
#require CGI::Lite;
print "Content-type: text/html\n\n";
#print "Hello, World.";
unless ( open my $fh, "/usr/lib/perl5/5.8.8/CGI.pm" ) {
print "Can't open CGI.pm for reading: $!\n";
exit;
}
print "Could open CGI.pm for reading\n";
# ./helloworld.cgi
Content-type: text/html
Could open CGI.pm for reading
[url]http://localhost/cgi-bin/helloworld.cgi[/url]
Can't open CGI.pm for reading: 13
Eric R. Meyers Guest
-
John Bokma #4
Re: Problems with Apache 2.0, mod_perl2 and perl
"Eric R. Meyers" <ermeyers@adelphia.net> wrote:
Yup, so in short: your CGI script is running as a user who has no> [url]http://localhost/cgi-bin/helloworld.cgi[/url]
> Can't open CGI.pm for reading: 13
permission to read CGI.pm which means that perl can't open the module to
use it.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: [url]http://castleamber.com/[/url]
John Bokma Guest
-
Juha Laiho #5
Re: Problems with Apache 2.0, mod_perl2 and perl
"Eric R. Meyers" <ermeyers@adelphia.net> said:
....>I'm using FC4 Linux, and I'm having some problems with Apache 2.0.What are the permissions for libperl.so (and directories above it)?>2. I can only get a statically linked perl to run.
>
> a) /usr/bin/perl: error while loading shared libraries: libperl.so:
> cannot open shared object file: Permission denied
This could also cause the problems with mod_perl.
Later in thread, you showed that CGI.pm could not be loaded -- again,>3. When I try to run a simple CGI.pm program under Apache, with the static
> perl, the perl can't find CGI.pm in the @INC paths. Of course, the
> script works just fine from the command line.
what are the permissions fo the file, and directories above it?
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Juha Laiho Guest
-
Eric R. Meyers #6
Re: Problems with Apache 2.0, mod_perl2 and perl
Juha Laiho wrote:
Everything is fine, except under Apache. CGI.pm is 444, or a+r.> "Eric R. Meyers" <ermeyers@adelphia.net> said:> ...>>I'm using FC4 Linux, and I'm having some problems with Apache 2.0.>>>2. I can only get a statically linked perl to run.
>>
>> a) /usr/bin/perl: error while loading shared libraries:
>> libperl.so:
>> cannot open shared object file: Permission denied
> What are the permissions for libperl.so (and directories above it)?
> This could also cause the problems with mod_perl.
>>>>3. When I try to run a simple CGI.pm program under Apache, with the static
>> perl, the perl can't find CGI.pm in the @INC paths. Of course, the
>> script works just fine from the command line.
> Later in thread, you showed that CGI.pm could not be loaded -- again,
> what are the permissions fo the file, and directories above it?
Eric R. Meyers Guest
-
Eric R. Meyers #7
Re: Problems with Apache 2.0, mod_perl2 and perl
John Bokma wrote:
In httpd.conf both User and Group are apache by default, and I changed it to> "Eric R. Meyers" <ermeyers@adelphia.net> wrote:
>>>> [url]http://localhost/cgi-bin/helloworld.cgi[/url]
>> Can't open CGI.pm for reading: 13
> Yup, so in short: your CGI script is running as a user who has no
> permission to read CGI.pm which means that perl can't open the module to
> use it.
>
root, nobody, ermeyers, and nothing seemed to matter. Nice problem huh?
Eric R. Meyers Guest
-
John Bokma #8
Re: Problems with Apache 2.0, mod_perl2 and perl
"Eric R. Meyers" <ermeyers@adelphia.net> wrote:
But does this make your script run as root (!!!), nobody, etc?> John Bokma wrote:
>>>> "Eric R. Meyers" <ermeyers@adelphia.net> wrote:
>>>>>>> [url]http://localhost/cgi-bin/helloworld.cgi[/url]
>>> Can't open CGI.pm for reading: 13
>> Yup, so in short: your CGI script is running as a user who has no
>> permission to read CGI.pm which means that perl can't open the module
>> to use it.
>>
> In httpd.conf both User and Group are apache by default, and I changed
> it to root, nobody, ermeyers, and nothing seemed to matter. Nice
> problem huh?
--
John Bokma Freelance software developer
&
Experienced Perl programmer: [url]http://castleamber.com/[/url]
John Bokma Guest
-
Eric R. Meyers #9
Re: Problems with Apache 2.0, mod_perl2 and perl
John Bokma wrote:
I believe so, but it's okay for a one-timer, because root is a close> "Eric R. Meyers" <ermeyers@adelphia.net> wrote:
>>>> John Bokma wrote:
>>>>>>> "Eric R. Meyers" <ermeyers@adelphia.net> wrote:
>>>
>>>> [url]http://localhost/cgi-bin/helloworld.cgi[/url]
>>>> Can't open CGI.pm for reading: 13
>>>
>>> Yup, so in short: your CGI script is running as a user who has no
>>> permission to read CGI.pm which means that perl can't open the module
>>> to use it.
>>>
>> In httpd.conf both User and Group are apache by default, and I changed
>> it to root, nobody, ermeyers, and nothing seemed to matter. Nice
>> problem huh?
> But does this make your script run as root (!!!), nobody, etc?
>
personal friend of himself. It's back to apache, right now, and I'll use
ps to verify the ug next time I try changing it.
Thanks,
Eric
Eric R. Meyers Guest
-
John Bokma #10
Re: Problems with Apache 2.0, mod_perl2 and perl
"Eric R. Meyers" <ermeyers@adelphia.net> wrote:
But running your scripts as root is certainly not a solution you should> John Bokma wrote:
>> I believe so, but it's okay for a one-timer, because root is a close>> "Eric R. Meyers" <ermeyers@adelphia.net> wrote:
>>>>>>> John Bokma wrote:
>>>
>>>> "Eric R. Meyers" <ermeyers@adelphia.net> wrote:
>>>>
>>>>> [url]http://localhost/cgi-bin/helloworld.cgi[/url]
>>>>> Can't open CGI.pm for reading: 13
>>>>
>>>> Yup, so in short: your CGI script is running as a user who has no
>>>> permission to read CGI.pm which means that perl can't open the module
>>>> to use it.
>>>>
>>>
>>> In httpd.conf both User and Group are apache by default, and I changed
>>> it to root, nobody, ermeyers, and nothing seemed to matter. Nice
>>> problem huh?
>> But does this make your script run as root (!!!), nobody, etc?
>>
> personal friend of himself.
consider. I wouldn't try it, not even on a stand alone box for a one-timer
:-D
Perl can do that for you as well.> It's back to apache, right now, and I'll use
> ps to verify the ug next time I try changing it.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: [url]http://castleamber.com/[/url]
John Bokma Guest
-
Mumia W. #11
Re: Problems with Apache 2.0, mod_perl2 and perl
Eric R. Meyers wrote:
[url]http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#Error_about_not_finding_I_Apa che_pm__with_I_CGI_pm_[/url]> I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
>
> perl 5.8.8
>
> httpd 2.0.54-10.3
>
> mod_perl 2.0.1-1.fc4
>
> 1. If I add the load mod_perl in the perl.conf, the service httpd start
> dies.
>
> a) Nothing about the death of httpd in the error_log.
>
> 2. I can only get a statically linked perl to run.
>
> a) /usr/bin/perl: error while loading shared libraries: libperl.so:
> cannot open shared object file: Permission denied
> [...]
IOW, upgrade CGI.pm if necessary, but look at the entire troubleshooting
page first.
At one time, the mod_perl docs suggested that using mod_perl as a DSO
under Redhat was a bad idea. You might need a statically linked mod_perl.
Mumia W. Guest
-
Eric R. Meyers #12
Re: Problems with Apache 2.0, mod_perl2 and perl
Mumia W. wrote:
[url]http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#Error_about_not_finding_I_Apa che_pm__with_I_CGI_pm_[/url]> Eric R. Meyers wrote:>>> I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
>>
>> perl 5.8.8
>>
>> httpd 2.0.54-10.3
>>
>> mod_perl 2.0.1-1.fc4
>>
>> 1. If I add the load mod_perl in the perl.conf, the service httpd start
>> dies.
>>
>> a) Nothing about the death of httpd in the error_log.
>>
>> 2. I can only get a statically linked perl to run.
>>
>> a) /usr/bin/perl: error while loading shared libraries:
>> libperl.so:
>> cannot open shared object file: Permission denied
>> [...]
>I have the latest $CGI::VERSION='3.20';>
> IOW, upgrade CGI.pm if necessary, but look at the entire troubleshooting
> page first.
>
> At one time, the mod_perl docs suggested that using mod_perl as a DSO
> under Redhat was a bad idea. You might need a statically linked mod_perl.
I'll concentrate on the mod_perl issue #1.
Thanks,
Eric
Eric R. Meyers Guest
-
Juha Laiho #13
Re: Problems with Apache 2.0, mod_perl2 and perl
"Eric R. Meyers" <ermeyers@adelphia.net> said:
If you get "cannot open shared object file: Permission denied",>Juha Laiho wrote:
>>>> "Eric R. Meyers" <ermeyers@adelphia.net> said:>> ...>>>I'm using FC4 Linux, and I'm having some problems with Apache 2.0.>>>>>2. I can only get a statically linked perl to run.
>>>
>>> a) /usr/bin/perl: error while loading shared libraries:
>>> libperl.so:
>>> cannot open shared object file: Permission denied
>> What are the permissions for libperl.so (and directories above it)?
>> This could also cause the problems with mod_perl.
>>>>>>>3. When I try to run a simple CGI.pm program under Apache, with the static
>>> perl, the perl can't find CGI.pm in the @INC paths. Of course, the
>>> script works just fine from the command line.
>> Later in thread, you showed that CGI.pm could not be loaded -- again,
>> what are the permissions fo the file, and directories above it?
>Everything is fine, except under Apache. CGI.pm is 444, or a+r.
everything is most definitely not fine. "strace" would be another
tool which might show some additional information on where the
opening of libperl.so fails.
Btw, do you have SELinux, or some other security enchancements
activated? Do you perhaps run Apache chrooted, and the chroot
environment does not include perl installation?
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Juha Laiho Guest
-
Big and Blue #14
Re: Problems with Apache 2.0, mod_perl2 and perl
Eric R. Meyers wrote:
> I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
>....2) Has nothing to do with mod_perl or Apache. "Permission denied"> 2. I can only get a statically linked perl to run.
>
> a) /usr/bin/perl: error while loading shared libraries: libperl.so:
> cannot open shared object file: Permission denied
sounds as though you've screwed up permissions, since all Perl modules and
libraries should be usable by anyone (except in very special circumstances,
which I doubt obtain here).
--
Just because I've written it doesn't mean that
either you or I have to believe it.
Big and Blue Guest
-
Eric R. Meyers #15
Re: Problems with Apache 2.0, mod_perl2 and perl
Big and Blue wrote:
Not the problem.> Eric R. Meyers wrote:>>> I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
>>....>>> 2. I can only get a statically linked perl to run.
>>
>> a) /usr/bin/perl: error while loading shared libraries:
>> libperl.so:
>> cannot open shared object file: Permission denied
> 2) Has nothing to do with mod_perl or Apache. "Permission denied"
> sounds as though you've screwed up permissions, since all Perl modules and
> libraries should be usable by anyone (except in very special
> circumstances, which I doubt obtain here).
>
>
>
>
Thanks,
Eric
Eric R. Meyers Guest
-
Eric R. Meyers #16
Re: Problems with Apache 2.0, mod_perl2 and perl
Juha Laiho wrote:
I'll look as you've suggested. Good ideas Juha! For everyone else out> "Eric R. Meyers" <ermeyers@adelphia.net> said:>>>Juha Laiho wrote:
>>>>>>> "Eric R. Meyers" <ermeyers@adelphia.net> said:
>>>>I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
>>> ...
>>>>2. I can only get a statically linked perl to run.
>>>>
>>>> a) /usr/bin/perl: error while loading shared libraries:
>>>> libperl.so:
>>>> cannot open shared object file: Permission denied
>>>
>>> What are the permissions for libperl.so (and directories above it)?
>>> This could also cause the problems with mod_perl.
>>>
>>>>3. When I try to run a simple CGI.pm program under Apache, with the
>>>>static
>>>> perl, the perl can't find CGI.pm in the @INC paths. Of course, the
>>>> script works just fine from the command line.
>>>
>>> Later in thread, you showed that CGI.pm could not be loaded -- again,
>>> what are the permissions fo the file, and directories above it?
>>Everything is fine, except under Apache. CGI.pm is 444, or a+r.
> If you get "cannot open shared object file: Permission denied",
> everything is most definitely not fine. "strace" would be another
> tool which might show some additional information on where the
> opening of libperl.so fails.
>
> Btw, do you have SELinux, or some other security enchancements
> activated? Do you perhaps run Apache chrooted, and the chroot
> environment does not include perl installation?
there, Perl works just fine outside of trying to run Perl-CGI scripts under
Apache 2.0, or my other problem of trying to load mod_perl2. The
permissions and everthing else are just fine. I'm setup very standard.
I found the problem with not being able to use modules with my static build
of perl. It won't load anything dynamically, because that's how I got a
static build, because I turned off dynamic loading. I'd have to build it
by linking-in every module that I'd want to use in a CGI program. Nope.
Thanks,
Eric
Eric
Eric R. Meyers Guest
-
Eric R. Meyers #17
Re: Problems with Apache 2.0, mod_perl2 and perl
Juha Laiho wrote:
And the ANSWER was SELinux! Perl-CGI scripts immediately worked when I> "Eric R. Meyers" <ermeyers@adelphia.net> said:>>>Juha Laiho wrote:
>>>>>>> "Eric R. Meyers" <ermeyers@adelphia.net> said:
>>>>I'm using FC4 Linux, and I'm having some problems with Apache 2.0.
>>> ...
>>>>2. I can only get a statically linked perl to run.
>>>>
>>>> a) /usr/bin/perl: error while loading shared libraries:
>>>> libperl.so:
>>>> cannot open shared object file: Permission denied
>>>
>>> What are the permissions for libperl.so (and directories above it)?
>>> This could also cause the problems with mod_perl.
>>>
>>>>3. When I try to run a simple CGI.pm program under Apache, with the
>>>>static
>>>> perl, the perl can't find CGI.pm in the @INC paths. Of course, the
>>>> script works just fine from the command line.
>>>
>>> Later in thread, you showed that CGI.pm could not be loaded -- again,
>>> what are the permissions fo the file, and directories above it?
>>Everything is fine, except under Apache. CGI.pm is 444, or a+r.
> If you get "cannot open shared object file: Permission denied",
> everything is most definitely not fine. "strace" would be another
> tool which might show some additional information on where the
> opening of libperl.so fails.
>
> Btw, do you have SELinux, or some other security enchancements
> activated? Do you perhaps run Apache chrooted, and the chroot
> environment does not include perl installation?
checked "Disable SELinux protection for httpd daemon" in the
system-config-securitylevel utility.
Thanks very much Juha,
Eric
Eric R. Meyers Guest



Reply With Quote

