Mike Witkowski wrote: > > Does anyone have an idea on this? > > === > $dbh = Sybase::DBlib->dblogin($usr, $pwd, $server, 'cipro_2k'); > $dbh -> dbcmd("select * from $table_name where userid = '$usr' "); > === > > yields an error :: > > === > [error] [asp] [15319] [error] Can't call method "dbcmd" on an undefined > value at session_query_parse.psp line 35. <--> , > /usr/local/share/perl/5.6.1/Apache/ASP.pm line 1550 > === >
Is there anything in $! ? Is there any way to get this to trigger a better error like RaiseError in DBI ? > when I try to run it in an asp file > > But I can connect to the db server fine when I write a stand alone > script? > > What am I missing? > Any thoughts or ideas would be appreciated! > My experience with Oracle has been similar, where so much gets configured from the environment variables, that the difference between running perl code from the httpd & another user environment can make programs not work. Running perl code from the httpd causes not only the %ENV to be different ( which can be a big deal ) but also causes the user itself to be different, so there may be permissions issues. Also if you have gone & done something like chroot or jail your web server, lots of other things could not be working right because of those limitations. I would first look and see what is different between %ENV as a user from the command line, and in mod_perl. Then I would make those parts that might be Sybase related the same by doing something like init %ENV variables in Script_OnStart on in the script itself to start with. If you still have problems, there might be a user permissions issue, in which case I would configure the httpd to run as the same user as you run scripts from the command line. I would not run the web server this way in production, but this may help isolate what the problems are. If the user you run the web server as normally does not have read access to the Sybase libs for example that could cause problems. --Josh _________________________________________________________________ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com 1-714-625-4051 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]