Chong,
I am not a web programmer, but I see some things I would definitely fix in your program: 1. You should always 'use strict;' and 'use warnings;' - it will help you find things like this. 2. You should always check your statement handles after all calls (ora_open()). 3. You should always use bind variables to avoid SQL injection. 4. Line #92 looks suspicious to me - shouldn't there be two "\n" characters to avoid the "premature end of script headers" error (see http://htmlfixit.com/cgi-tutes/tutorial_Common_Web_dev_error_messages_an d_what_they_mean.php)? -- Ron Reidy Lead DBA Array BioPharma, Inc. ________________________________ From: Chong, Wei-Ling [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 30, 2007 3:23 AM To: [email protected] Subject: Can't call method "prepare" on an undefined value Hi, I have one oracle database located at server A and setup the Oracle HTTP Server at Server B. Both server are Solaris server. I have installed DBI and DBD into Server B and setup the oraperl in my perl script. When I run the perl script, I am getting error: Can't call method "prepare" on an undefined value at /oracle/app/http/product/OA S10.1.2.0.2/perl/lib/site_perl/5.6.1/sun4-solaris/Oraperl.pm line 121. [Tue Jan 30 16:39:26 2007] [error] [client 165.204.172.185] [ecid: 1170146365:16 5.204.178.123:1213:0:7,0] Premature end of script headers: /oracle/app/http/dl/w eb/cgi/eppcd/ppcd_approval_ora.pl It works fine when the oraperl is located same server as the database. I search through internet and it might due to connection string problem. I am able to sqlplus to this database in Server B: sqlplus [EMAIL PROTECTED] Attached is my perl script. Is there any error on my oraperl code? Please help, very appriate. Thanks. Best Regards, Chong This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.
