I am using the instant oracle client 11.2, php 5.5.16 compiled from sources with the following configure arguments:
'./configure' '--enable-fpm' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl' '--enable-dba' '--enable-exif' '--enable-ftp' '--with-gd' '--with-gettext' '--with-kerberos' '--enable-mbstring' '--with-mcrypt' '--with-openssl' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-wddx' '--enable-zip' '--with-zlib' '--with-xsl' '--with-mysql' '--with-mysqli' '--with-pgsql' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-oci8' '--with-pdo-oci'
On my previous configuration I was using apache2 (--with-apxs2=/usr/bin/apxs2
instead of --enable-fpm
) with oracle and oci8. My Data Source Name is: "oci:dbname=//IP:1521/SID;charset=UTF8"
.
It was working just fine.
Today I wanted to move this server configuration from apache to nginx and fpm. Everything is working fine except that, on connection, PDO throws :
OCIEnvNlsCreate: Check the character set is valid and that PHP has access to Oracle libraries and NLS data
I've got the exact same configuration except for php-fpm handling php instead of apxs.
If I remove the charset=UTF8
part it works but obviously I got charset errors. I've added to my php_fpm.conf
the env[NLS_LANG]=FRENCH_FRANCE.UTF8
environment variable with no success.
What can I do to make the nginx/php-fpm configuration to work?