Posted on 2009-03-26 08:04:12-07 by andynic
problems with Apache startup and mod_perl
Hi, Be warned, am a newbie at this and need some step-by-step hand-holding.

I've installed mod_perl on my system, and when I start the Apache server, the log file shows the following message:
[error] (OS 127)The specified procedure could not be found. : DBD: mod_dbd not compatible with APR in get_driver
[error] (OS 127)The specified procedure could not be found. : DBD: failed to initialise

The error occurs whether or not the following is in httpd.conf:
LoadModule perl_module modules/mod_perl.so

Can anyone explain why this is happening and how I can correct it.

I installed mod_perl as follows and then followed the instructions with the ending message: http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd

To enable mod_perl, put in the directives
LoadFile "C:/Path/to/Perl/bin/perl510.dll"
LoadModule perl_module modules/mod_perl.so
in httpd.conf. For more information, visit
http://perl.apache.org/
and especially see
http://perl.apache.org/docs/2.0/rename.html


done
470 files unchanged
4 files updated


My configuration:
=================
Windows XP Professional Service Pack 3
Apache 2.2
Perl 5.10
MySQL 5.1
Use ODBC db connection in Perl DBI/CGI scripts
Installed DBD module as follows which enables me to connect to MySQL with a simple DBI script from
the command line but not from a CGI script via a web-browser:
ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/DBD-mysql.ppd
but ODBC works from both the command line and from a CGI script via a web-browser.


Thanks for your help.
Andynic
Direct Responses: 10337 | Write a response
Posted on 2009-03-26 10:23:34-07 by andynic in response to 10334
Re: problems with Apache startup and mod_perl
Don't know if this sheds any light on the matter, but I ran the following test script:

#!c:/Perl/bin/perl.exe
##
## printenv -- demo CGI program which just prints its environment
##

print "Content-type: text/plain; charset=iso-8859-1\n\n";z
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}


which produced:
AUTH_TYPE="Basic"
COMSPEC="C:\WINDOWS\system32\cmd.exe"
DOCUMENT_ROOT="C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
GATEWAY_INTERFACE="CGI/1.1"
HTTP_ACCEPT="*/*"
HTTP_ACCEPT_ENCODING="gzip, deflate"
HTTP_ACCEPT_LANGUAGE="en-us"
HTTP_CONNECTION="Keep-Alive"
HTTP_HOST="localhost"
HTTP_UA_CPU="x86"
HTTP_USER_AGENT="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; .NET CLR 1.1.4322)"
PATH="C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\oracle\product\10.2.0\db_1\bin;C:\oracle\product\OWB10.1\bin;C:\oracle\product\OWB10.1\jre\1.4.2\bin\client;C:\oracle\product\OWB10.1\jre\1.4.2\bin;C:\oracle\product\10.2.0\HTML_HTTP\bin;C:\oracle\product\10.2.0\HTML_HTTP\jlib;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\"
PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"
QUERY_STRING=""
REMOTE_ADDR="127.0.0.1"
REMOTE_PORT="1083"
REMOTE_USER="gfr"
REQUEST_METHOD="GET"
REQUEST_URI="/modperl/printenv.pl"
SCRIPT_FILENAME="C:/Documents/Documents_20090101_to_20091231/Computing/GalleryForRent_Maintenance/modperl/printenv.pl"
SCRIPT_NAME="/modperl/printenv.pl"
SERVER_ADDR="127.0.0.1"
SERVER_ADMIN="andynic@xs4all.nl"
SERVER_NAME="localhost"
SERVER_PORT="80"
SERVER_PROTOCOL="HTTP/1.1"
SERVER_SIGNATURE=""
SERVER_SOFTWARE="Apache/2.2.11 (Win32) mod_perl/2.0.4-dev Perl/v5.10.0"
SYSTEMROOT="C:\WINDOWS"
WINDIR="C:\WINDOWS"

Does this indicate that the mod_perl.so is installed? If so, then why the errors in error.log
Thanks,
Andynic
Direct Responses: 10338 | Write a response
Posted on 2009-03-26 10:52:55-07 by andynic in response to 10337
Re: problems with Apache startup and mod_perl
One further piece of info:
Via the ppm gui interface, I clicked on mod_perl and then from the Action menu chose Verify.
I received the following message:
Synchronizing Database done
Verifying mod_perl ...
475 files verified
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.