Re: modperl and DBI or DBD with mysql

2006-02-10 Thread Derek Robson
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:1

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Derek Robson
ok so now i have tried using warn and i get check1 and check2 but not check3. I am thinking that it must be something in my setup rather than my code. in my httpd.conf I have... Alias /perl/ /var/www/perl/ PerlModule Apache::PerlRun PerlModule DBI PerlModule DBD::mysql SetHandler perl-

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Michael Peters
Derek Robson wrote: > > > print "check1"; > my $dbArgs = { RaiseError => 1, AutoCommit => 0 , TraceLevel => 3 , > PrintError => 1 }; > print "check2"; > my $dbh = DBI->connect("DBI:mysql:database=answerguy;", > "robsonde", "ur4xgod",$dbArgs ) > or die "Cannot con

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Derek Robson
print "check1"; my $dbArgs = { RaiseError => 1, AutoCommit => 0 , TraceLevel => 3 , PrintError => 1 }; print "check2"; my $dbh = DBI->connect("DBI:mysql:database=answerguy;", "robsonde", "ur4xgod",$dbArgs ) or die "Cannot connect to database: $!"; print "check3"

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Michael Peters
John Doe wrote: > An easy quick and dirty way to find out where your code stucks is by putting > warns (go to the error log) or prints (go to browser) after every statement > in the code. warns are nice cause they go to the error log rather than waiting on the browser to receive and display.

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread John Doe
> how can i check its not a connection timeout problem? If your query takes longer than # Timeout: The number of seconds before receives and sends time out. Timeout 300 in the httpd.conf file the connection is closed by the server. But this is rather inprobable I think; you could run the db qu

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Derek Robson
how can i check its not a connection timeout problem? is there a very basic example online of DBI under mod perl? At 04:31 a.m. 6/02/2006, John Doe wrote: Jonathan Vanasco am Sonntag, 5. Februar 2006 00.27: > Try: > > my $dbArgs = { RaiseError => 1, AutoCommit => 0 , TraceLevel => 3 }; > m

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Derek Robson
same result, still no errors. At 05:23 p.m. 5/02/2006, Malcolm J Harwood wrote: On Saturday 04 February 2006 02:45 am, Derek Robson wrote: > DBI->connect("DBI:mysql:database=answerguy;host=elmo.elmo.theanswerguy.co.n >z", "robsonde", "ur4xgod", I don't know what the problem with your code is,

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread John Doe
Jonathan Vanasco am Sonntag, 5. Februar 2006 00.27: > Try: > > my $dbArgs = { RaiseError => 1, AutoCommit => 0 , TraceLevel => 3 }; > my$dbh = DBI->connect( $db, $dbUser, $dbPass , $dbArgs ); > > while you `tail -f` the errorlog ( /usr/local/apache2/log/error_log > on my system ) > > the trace

Re: modperl and DBI or DBD with mysql

2006-02-05 Thread Malcolm J Harwood
On Saturday 04 February 2006 02:45 am, Derek Robson wrote: > DBI->connect("DBI:mysql:database=answerguy;host=elmo.elmo.theanswerguy.co.n >z", "robsonde", "ur4xgod", I don't know what the problem with your code is, but you probably should change your password now that you've told everyone. :) >

Re: modperl and DBI or DBD with mysql

2006-02-04 Thread Derek Robson
now when i run it from the command line i get 2 pages or debug type info, from the brower i get nothing, error_log also show nothing. is there a setting in httpd.conf that tells it not to log stuff?!?!? i think that it is not running the DBI->connect code, have i got modperl setup right? have i

Re: modperl and DBI or DBD with mysql

2006-02-04 Thread Jonathan Vanasco
Try: my $dbArgs = { RaiseError => 1, AutoCommit => 0 , TraceLevel => 3 }; my $dbh = DBI->connect( $db, $dbUser, $dbPass , $dbArgs ); while you `tail -f` the errorlog ( /usr/local/apache2/log/error_log on my system ) the tracelevel will show you exactly what's going on within DBI. On

Re: modperl and DBI or DBD with mysql

2006-02-04 Thread Derek Robson
that did not help, still no errors, still not good output. 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 c

Re: modperl and DBI or DBD with mysql

2006-02-04 Thread Frank Wiles
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-

modperl and DBI or DBD with mysql

2006-02-03 Thread Derek Robson
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("