This content has been marked as final. Show 1 reply
If you're using the system Apache, try exporting environment variables including LD_LIBRARY_PATH, NLS_LANG etc in /etc/sysconfig/httpd. Make sure Apache has access to the Oracle libraries and NLS message files.
The error is coming from PDO_OCI, which is different from OCI8. I can't recommend using PDO_OCI. It has known crashes and isn't maintained. It doesn't have the features that OCI8 has.
The Oracle globalization manual says NLS_LANGUAGE is "Initialization parameter and ALTER SESSION" but doesn't say it an environment variable. It is derived from the NLS_LANG environment variable. So, I'd expect to see only NLS_LANG in phpinfo.
Don't ever use putenv() in the .php file for Oracle environment variables because Oracle may get initialized before the PHP script runs, and inconsistent variable setting could be used.
Finally, I recommend developing using the same platform as the intended deployment platform. There are plenty of subtle and not so subtle differences in PHP between Windows and Linux.
If you start using OCI8, there are some tips in http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html.