Thanks Stephen, I added the line as you mentioned. I am getting this error message. I verified the TNS settings by logging into database using sqlplus as user "www" and it worked fine. =========================== DBI->connect(aali, aali, aali) failed: ORA-12154: TNS:could not resolve service name (DBD ERROR: OCIServerAttach) at /www/cgi-bin/pl ot5.pl line 16 Can't locate auto/DBI/prepare.al in @INC (@INC contains: /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 /usr/loc al/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at /www/cgi-bin/plo t5.pl line 17 [Fri Jul 5 10:56:52 2002] [error] [client 152.225.94.80] Premature end of script headers: /www/cgi-bin/plot5.pl ===========================
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 05, 2002 10:48 AM To: [EMAIL PROTECTED] Subject: RE: CGI and Oracle Question, try adding this to the beginning BEGIN { $ENV{ORACLE_HOME} = '/opt/oracle etc'; $ENV{ORACLE_SID} = 'SID'; } Stephen Redding BT Ignite Solutions Telephone - 0113 237 3312 Fax - 0113 244 1413 Email - [EMAIL PROTECTED] http://www.technet.bt.com/sit/public/ British Telecommunications plc Registered office: 81 Newgate Street London EC1A 7AJ Registered in England no. 1800000 This electronic message contains information from British Telecommunications plc which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. -----Original Message----- From: Naser Ali [mailto:[EMAIL PROTECTED]] Sent: Friday, July 05, 2002 15:32 To: '[EMAIL PROTECTED]' Subject: CGI and Oracle Question, Hello Everyone, I am trying to access Oracle database object (a table's contents) through a CGI script to print the information on the web page, but I am continuously getting this error message, "ORACLE_HOME environment variable not set! DBI->connect(aali) failed: Error while trying to retrieve text for error ORA-12154 (DBD ERROR: OCIServerAttach) at /www/cgi-bin/plo4 Can't Connect to the Database: Error while trying to retrieve text for error ORA-12154 (DBD ERROR: OCIServerAttach) [Fri Jul 5 10:17:12 2002] [error] [client 152.225.94.80] Premature end of script headers: /www/cgi-bin/plot4.pl" the owner and group of CGI script and httpd is www/www, whereas oracles user and group oracle/dba. If I run another script from command line with same code logic and syntax just to check that user "www" I am able to connect to database, it works fine. I am not sure what I am missing here. Any pointers and help will be appreciated. Regards