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 ==========</p> 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: /LibraryPerl/5.12/darwin-thread-multi-2level /Library/P +erl/5.12 /Network/Library/Perl/5.12/darwin-<p>thread-</p>multi-2level + /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Libr +ary</p>/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.1 +2 /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

In reply to Problems with mysqlPP and Apache by Mulga

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.