Perl Diety wrote: > We're trying to run a Perl program to connect to an Oracle 10 instance, on a > RH box. From the xterm it runs fine- connects, R/W, everything is ducky. no > issues whatsoever. > > Then we tried it from a browser (apache server) and it's been a nightmare > for days. After hours of research and trials, we finally managed to get past > the "Cannot load Oracle.so"errors by modifying the ld conf file in /etc., > rebuilding the DBI, etc. > > Now we've graduated to failed: "ERROR OCIEnvNlsCreate. Check (everything)" > which basically says (*something* is wrong). > > We went on a second research expiditon, and checked permissions, versions, > modified ENV vars for NLS, yet nothing seems to help; we just keep getting > this same message. The fiull message suggests a problem with ORACLE_HOME, > ORA_NLS10, NLS_LANG, and "etc" which we interpret to mean (anything at > all). > > We populated NLS_LANG to match *locale*. We also tried several other options > like america.american, etc. > > The error occurs at the Connect() step. I threw it into an eval{} block and > checked perlvars for messages, but they were the same as the fataltobrowser > message below. > > Finally, we use the same DBI to connect just fine from a browser to mysql. > So we know the DBI is at least functioning for some DBDs. > > Any advice on howe to isolate this to a file or conf value, etc would be > most welcome! > > Here is the info we can extract to try to get an idea of what it doesnt > like: > > available_drivers: > DBM > ExampleP > Oracle > Proxy > Sponge > mysql > > ENV VARS > > DOCUMENT_ROOT = /var2/www/html > GATEWAY_INTERFACE = CGI/1.1 > HTTP_ACCEPT = */* > HTTP_ACCEPT_ENCODING = gzip, deflate > HTTP_ACCEPT_LANGUAGE = en-us > HTTP_HOST = ournode.com > HTTP_UA_CPU = x86 > HTTP_USER_AGENT = Mozilla/4.0 > LD_LIBRARY_PATH = /export/apps/oracle/product/10201/lib > LD_RUN_PATH = /export/apps/oracle/product/10201/lib > NLS_LANG = en_GB.UTF-8 > ORACLE_BASE = /export/apps/oracle > ORACLE_HOME = /export/apps/oracle/product/10201 > ORA_NLS10 = /export/apps/oracle/product/10201/nls/data/ > REQUEST_METHOD = GET > REQUEST_URI = /cgi-bin/oratest.cgi > SERVER_PORT = 80 > SERVER_PROTOCOL = HTTP/1.1 > SERVER_SIGNATURE = > > Apache/2.0.52 (Red Hat) Server at ournode.com Port 80 > > SERVER_SOFTWARE = Apache/2.0.52 (Red Hat) > DBI connect(...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) > env var or PATH (Windows) and or NLS settings, permissions, etc. at > /cgi-bin/oratest.cgi line 32 >
Did you really set AND export ORACLE_HOME or LD_LIBRARY_PATH such that Apache children see them? I can't remember what the syntax in the httpd.conf file is now (SetEnv perhaps) as I no longer use Apache but you used to have to explicitly tell Apache which env vars to allow. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com