View previous topic :: View next topic |
Author |
Message |
Kenji Miyamoto Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/108568614c11b737d3e30.jpg)
Joined: 28 May 2005 Posts: 1452 Location: Looking over your shoulder.
|
Posted: Sun Mar 18, 2007 7:46 pm Post subject: Apache2 "Internal Server Error" With mod_perl and |
|
|
When running mod_perl as following: Code: | $ grep -i perl /etc/apache2/httpd.conf
LoadModule perl_module modules/mod_perl.so
# avoid the ambiguity with the common suffix for perl scripts. |
Code: | cat /etc/apache2/modules.d/75_mod_perl.conf
<IfDefine PERL>
<IfModule !mod_perl.c>
LoadModule perl_module modules/mod_perl.so
</IfModule>
</IfDefine>
<IfModule mod_perl.c>
#PerlTrace all
PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl"
#Provide two aliases to the same cgi-bin directory,
#to see the effects of the 2 different mod_perl modes
#for Apache2::Registry Mode
# Alias /perl/ /var/www/localhost/perl/
#for Apache2::Perlrun Mode
# Alias /cgi-perl/ /var/www/localhost/perl/
<IfModule mod_access.c>
<Location /perl-status>
SetHandler perl-script
PerlResponseHandler Apache2::Status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>
<Directory /home/*/public_html/perl>
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options -Indexes ExecCGI
PerlOptions +ParseHeaders
</Directory>
PerlModule ModPerl::Registry
#set Apache::Registry Mode for /perl Alias
# To set subdirectories to use perl set the following
# and comment the orignial:
# <Location ~ "^/perl/.*\.pl$">
<Location "^/perl/*.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options -Indexes ExecCGI
PerlSendHeader On
</Location>
#set Apache::PerlRun Mode for /cgi-perl Alias
<Location /cgi-perl/*.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options -Indexes ExecCGI
PerlSendHeader On
</Location>
<Files ~ "\.pl$">
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options +ExecCGI
PerlSendHeader on
</files>
</ifModule> |
Code: | $ grep -i perl /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D PERL" |
Code: | Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache Server at bob Port 80 | What's the problem here? _________________ [ Kawa-kun, new and improved!! ]
Alex Libman seems to be more of an anarchist than a libertarian.
Last edited by Kenji Miyamoto on Sun Mar 18, 2007 8:29 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Kenji Miyamoto Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/108568614c11b737d3e30.jpg)
Joined: 28 May 2005 Posts: 1452 Location: Looking over your shoulder.
|
Posted: Sun Mar 18, 2007 8:29 pm Post subject: |
|
|
It looks like the problem only occurs with DBI, but only if using a member function, such as the $db->disconnect below: Code: | #!/usr/bin/perl
use strict;
use Apache::DBI;
use DBI;
my $db = DBI->connect("dbi:SQLite:collection.db");
$db->disconnect;
print "Content-Type: application/xml\n\n<?xml version=\"1.0\" ?>\n<foot toes=\"20\">100</foot>\n\n"; | I don't understand why DBI isn't working; I have DBI and DBD-SQLite installed. What's going on?
The drivers listed are DBM, ExampleP, File, Proxy, SQLite, Sponge, mysql: Code: | #!/usr/bin/perl
use strict;
require DBI;
my @drivers = DBI->available_drivers;
print "Content-Type: text/plain\n\n";
print join(", ", @drivers), "\n"; |
_________________ [ Kawa-kun, new and improved!! ]
Alex Libman seems to be more of an anarchist than a libertarian. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|