Fart on the local environment
Win7+nginx1.5.9+php5.4.15+pdo_oci
Done, the result is normal.
Upload the test.
Centos5.9+nginx1.5.9+php5.4.14+pdo_oci
Result: Command line normal, fast_cgi mode normal
So upgrade PHP version to the latest php5.4.33 reload
Result: the command line is normal and not garbled, fast_cgi connection is normal, but garbled.
A variety of google,baidu, have not found a solution.
Also installs a version of PHP that is consistent with the formal environment php5.4.19
Result: Still fast_cgi connection is normal, but garbled.
There must be a problem with the environment variable.
Finally, find an article, said PHP-FPM can set environment variables, then try it. Add a few lines at the bottom:
Env[oracle_home] =/usr/lib/oracle/11.2/client64/
Env[ld_library_path] =/usr/lib/oracle/11.2/client64/lib/
Env[nls_lang] = "American_america. Al32utf8 "
Restart PHP-FPM
The result: everything is fine.
PHP using PDO_OCI connection oracle,php-fpm garbled, command line normal solution