Have it print $dbh->errstr to see what the database says is wrong. At least that'd work with DBI not sure about Sybase::Dblib.
Regardless have it print the problem instead of just , 'sorry' Not sure also but it sounds like apache may not have permission to access the database. Ie you 'userbob' can access it but 'nobody' can't. Dan -----Original Message----- From: Andy Bridger [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 11:03 AM To: Beginners Perl (E-mail) Subject: Sybase DBlib & CGI issue I have a perl cgi script that needs to access a database using Sybase::DBlib. The CGI bit is working - am able to display text, forms etc correctly, but when try to connect to the database it fails to connect. Oddly the same db connection script works in a different script - and the db connection even works if run from the unix command line. use Sybase::DBlib; my $user = "xxxt"; my $pwd = "yyy"; my $server = "zzz"; my $dbh; if ($dbh = new Sybase::DBlib $user, $pwd, $server) { print "<p>Server: $server </p>\n"; $dbh->dbuse("kplus"); } else { print "<p>Couldn't connect to $server </p>"; return -1; } This displays the server connection when run from the command line, but the "Couldn't connect.." when run via the browser... The web server is Apache running on Solaris if that makes any difference. Any suggestions gratefully received. > Andy Bridger > > > > ---------------------------------------------------- This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]