in reply to Output of CGI with DBI
Your web server usually executes as a different user and with a different environment as you on the command line.
In your case it could be that $dbh is undef because the web server couldn't connect to the database. So better check those return values, especially if you turned off any error-raising as you seem to have done
PS: Please 'use warnings' at a minimum, 'use strict' is also advisable
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Output of CGI with DBI
by brp4h (Acolyte) on Jul 08, 2010 at 19:07 UTC | |
|
Re^2: Output of CGI with DBI
by brp4h (Acolyte) on Jul 08, 2010 at 17:25 UTC | |
by roboticus (Chancellor) on Jul 08, 2010 at 18:03 UTC | |
by brp4h (Acolyte) on Jul 08, 2010 at 18:37 UTC | |
by roboticus (Chancellor) on Jul 11, 2010 at 14:23 UTC |