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
 ---------------------------------

Reply via email to