As per Reidy, I printed $DBI::errstr and it turned out to be "Error: ORA-12154: TNS:could not resolve service name (DBD ERROR: OCIServerAttach) at myapp_utility.pm" This probably means Oracle SID or instance name which is 'ledmyapp' is not being recognized and is not there in tnsnames.ora But I confimed that tnsnames.ora has ledmyapp. Thats why standalone perl program worked from command line. So as per Ron and Bill, I also agree that environment variables might be incorrect. So I explicitly added $ENV{'ORACLE_HOME'} = '/opt/oracle/product/9.2.0.6.0_64c'; $ENV{'LD_LIBRARY_PATH'} = '/opt/oracle/product/9.2.0.6.0_64c/lib'; $ENV{'ORACLE_SID'} = 'ledmyapp'; $ENV{'PATH'} = $ENV{'PATH'}.":/opt/perl5/bin:/opt/oracle/product/9.2.0.6.0_64c/bin"; I printed them also to confirm that additions are being recognized. It is BUT STILL I AM GETTING THE SAME ERROR. Do you think any other env variables might be missing OR is there a different way to set env vars for iPlanet web server perl cgi progs? On Wed, 23 Mar 2005 Bill.Costa@unh.edu wrote : > > Ron.Reidy@arraybiopharma.com recently wrote (in part): > > > The fact your code executes from the command line and not the web > > server indicates either a permissions problme or an environment > > problem. > > I'll second that environment problem observation. When something > works from the command line but not as a CGI, that's one of the > first things I check. Here's an ugly Perl script that might > be of use in comparing the two environments. > > > ...BC > >-- >+----------------------------[ Bill.Costa@UNH.EDU ]---+ >| Bill Costa | >| CIS/TCS -- 1 Leavitt Lane PHONE: +1-603-862-3056 | No good deed... >| University of New Hampshire | goes unpunished. >| Durham, NH 03824 USA | >| | >+-----------------[ http://pubpages.unh.edu/~wfc/ ]---+