I have fixed it!!!

the problem was that the default install of openbsd has apache setup in a chroot jail kind of way.....
modperl could not "see" the database stuff.

all i had to do was setup apache to not run in chroot mode and it all works.


thanks to all those who offer help.





At 06:10 a.m. 5/02/2006, Frank Wiles wrote:
On Sat, 04 Feb 2006 20:45:05 +1300
Derek Robson <[EMAIL PROTECTED]> wrote:

> I am new to the world of modperl.
>
> Any help would be nice.
>
> I have some perl code that runs fine from the command line but not
> with modperl.
>
> #!/usr/local/bin/perl
> use strict;
> use DBI;
> print "Content-type: text/plain\n\n";
> print "check1";
> # Connect to the database.
>    my $dbh =
> DBI->connect
> ("DBI:mysql:database=answerguy;host=elmo.elmo.theanswerguy.co.nz",
> "robsonde", "ur4xgod", {'RaiseError' => 1});

  You want to put a die statement here to test if you are connecting
  to your database.  Something like:

  my $dbh = DBI->connect( ........... ) or
      die "Cannot connect to database: $!";

  As I bet this is your problem. You won't get any errors in your Apache
  log without using warn(), die(), croak(), or carp() because unless you
  do, to parody the Matrix, "There is no error". :)

  Hope this helps.

 ---------------------------------
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 ---------------------------------



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 6/02/2006

Reply via email to