mod_perl / Apache problem

D

David

Hi,

Hopefully this is being posted in the right place - apologies in
advance if not.

I'm having trouble getting mod_perl and Apache to work together on a
Windows XP Pro' machine. I can get the server to work fine for normal
Perl, but not for mod_perl. All I end up with are error 500's.

I have modified the httpd.conf file several times, and restarted etc,
etc, but no luck. The additions to my .conf file are as follows:

Alias /cgi-perl/ "E:/Apache2/cgi-perl/"
<Location /cgi-perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader on
Options ExecCGI
</Location>

<Location /perl-status>
SetHandler perl-script
PerlHandler Apache::Status
order deny,allow
deny from all
allow from 172.10.1.8
</Location>


.... I'm obviously on the internal IP address of 172.10.1.8, and I'm
trying to test a script in http://.../cgi-perl/test.cgi

The same script works fine in /cgi-bin/.

My environment variables and server signature indicate the mod_perl is
installed, as follows:

SERVER_SOFTWARE Apache/2.0.46 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0
PHP/4.3.2 mod_ssl/2.0.46 OpenSSL/0.9.7b

SERVER_SIGNATURE
Apache/2.0.46 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0 PHP/4.3.2
mod_ssl/2.0.46 OpenSSL/0.9.7b Server at 172.10.1.8 Port 79

GATEWAY_INTERFACE CGI/1.1

Now I know that for mod_perl the GATEWAY_INTERFACE should be reading
as something other than CGI/1.1 ... but have tried all sorts of stuff
to no avail.

If I look in the server error logs, then I can see:

Can't locate Apache/Registry.pm in @INC (@INC contains:
E:/Perl/site/lib/ E:/Perl/site/lib/Apache2 E:/Perl/lib
E:/Perl/site/lib . E:/Apache2/ E:/Apache2/lib/perl) at (eval 37) line
3.

.....

I do see Registry.pm in E:/Perl/site/lib/Win32/ and
E:/Perl/site/lib/Win32API/ ... but I can't help thinking that my
problem is not to do with that, since with the paths given above, then
Apache should be able to find them ...

I have actually un-installed and re-installed everything from the
ground up, but still seem to be missing something ...

Any help very much appreciated!

Thanks.
 
T

Tulan W. Hu

David said:
If I look in the server error logs, then I can see:

Can't locate Apache/Registry.pm in @INC (@INC contains:
E:/Perl/site/lib/ E:/Perl/site/lib/Apache2 E:/Perl/lib
E:/Perl/site/lib . E:/Apache2/ E:/Apache2/lib/perl) at (eval 37) line
3.
....

I do see Registry.pm in E:/Perl/site/lib/Win32/ and
E:/Perl/site/lib/Win32API/ ... but I can't help thinking that my
problem is not to do with that, since with the paths given above, then
Apache should be able to find them ...

I don't know how you installed your stuff. However, the error
message said it cannot find the
E:/Perl/site/lib/Apache/Registry.pm or
E:/Perl/site/lib/Apache2/Apache/Registry.pm or
E:/Perl/libApache/Registry.pm or
E:/Perl/site/libApache/Registry.pm or
E:/Apache2/Apache/Registry.pm or
E:/Apache2/lib/perlApache/Registry.pm

The @INC does not include E:/Perl/site/lib/Win32/, so even your
Apache/Registry.pm is under that directory. Perl still cannot find it.

Tulan
 
T

Tore Aursand

Hopefully this is being posted in the right place

I don't think so. This is related to the Apache web server, not Perl.
You should try one of the Apache newsgroups.

Good luck!
 
M

Mr I

Tore said:
I don't think so. This is related to the Apache web server, not Perl.
You should try one of the Apache newsgroups.

Good luck!
Agreed.
But here's some help to wing you on your way.

http://perl.apache.org/docs/2.0/os/win32/install.html
http://perl.apache.org/docs/1.0/guide/getwet.html

You will need a startup file to adjust the Perl modules search paths in
@INC.
Investigate the apache directive
PerlRquire

Have a google for mod_perl 2 and that will probably help you.

K
 
D

David

Tore Aursand said:
I don't think so. This is related to the Apache web server, not Perl.
You should try one of the Apache newsgroups.

Good luck!


Hmmm, one can't help thinking that mod_perl, and by association
Apache, is in fact somehow related to Perl ... that is after all the
whole point of mod_perl.
 
D

David

Thanks to all ...

I ended up phyiscally moving the location of Registry.pm into one of
the paths that I knew it could see, but also needed to change
httpd.conf references to Apache::Registry to be ModPerl::Registry

Also, per the above comments, the startup file (on XP) under
/Apache/confs/ also needed to be amended too.

Anyway, tested it and it all works fine now... Thanks!
 
T

Tore Aursand

Hmmm, one can't help thinking that mod_perl, and by association Apache,
is in fact somehow related to Perl ... that is after all the whole point
of mod_perl.

Irrelevant; The OP was specifically asking for help with configuring his
Apache web server (with mod_perl).

So. Let's see: Apache. Web server. mod_perl. Apache extension. Perl.
Programming language.

The only association I see is in the name 'mod_perl' and 'perl'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top