CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Problems with mysqlPP and Apache

 



Mulga
New User

Aug 6, 2012, 9:33 PM

Post #1 of 3 (1701 views)
Problems with mysqlPP and Apache Can't Post

I am running Perl on OS X. The version of Perl is 5.12.4, Apache is 2.2.1, MySql is 5.5.27

I am having a problem running using Apache with the CGI and mysqlPP modules.

I can run the following code natively without issue.

#!usr/bin/perl -w

use strict;

use DBI;
use CGI qw(:standard);

my $dbh = DBI->connect("dbi:mysqlPP:database=menagerie:host=localhost", uid, pwd,
{'RaiseError' => 1});

print header(),
start_html("Good Return - Constituent Report"),
h1("Good Return - Constituent Report");

print p("Does this work?");
print p("Databases");
print p("=========");

print end_html;

However when I try and run it in a browser, as intended, it fails. The following is output from the apache log. You can see that it is unable to find mysqlPP but when I look in PPM I can see that it is inatlled and I can run it natively, i.e. not as CGI.

Any help would be greatly appreciated.

========== Apache Log Start ==========
Perhaps the DBD::mysqlPP perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysqlPP' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
at /Users/paul_griffin/Sites/testsite/html01.pl line 41
install_driver(mysqlPP) failed: Can't locate DBD/mysqlPP.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at (eval 5) line 3.
Perhaps the DBD::mysqlPP perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysqlPP' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
at /Users/paul_griffin/Sites/testsite/htmltest.pl line 13
Premature end of script headers: htmltest.pl


FishMonger
Veteran / Moderator

Aug 7, 2012, 6:10 AM

Post #2 of 3 (1691 views)
Re: [Mulga] Problems with mysqlPP and Apache [In reply to] Can't Post

Sounds like you didn't install the module properly.

How and where did you install the DBD::mysqlPP module?


Mulga
New User

Aug 7, 2012, 3:48 PM

Post #3 of 3 (1672 views)
Re: [FishMonger] Problems with mysqlPP and Apache [In reply to] Can't Post

FM,

Many thanks for the response. I installed using PPM. I'm running ActiveState Perl ver 5.12.

Looking at PPM it is saying it has installed it in the following:

/Users/username/Library/ActivePerl-5.12/html/site/lib/DBD/mysqlPP.html
/Users/username/Library/ActivePerl-5.12/lib/DBD/mysqlPP.pm
/Users/username/Library/ActivePerl-5.12/lib/auto/DBD/mysqlPP/.packlist

I can confirm that this is correct.

What is strange is that I can run mysqlPP ok natively. It's only when I use it in conjunction with CGI running through apache.

Kind Regards

Paul

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives