Objective
Under the IoE wave, many of the big companies ' antique-grade systems are still using the IOE device. New owners some years of systems are using Oracle database, in order to save time, the new architecture of the business directly through the programming language API operation Oracle database, installation related extensions for the first toss of people, or will encounter a lot of pits, here to do a summary.
Download Oracle Client Instant clients
Windows only supports 32-bit and does not support 64-bit
Http://www.oracle.com/technetwork/topics/winsoft-085727.html
Extract
Direct decompression, no installation required
Setting environment variables
Oracle_home value is the directory path where the instant client resides
Open
PHP OCI Extended PDO extension
Fix garbled
Garbled due to inconsistent encoding used by Oracle database when Oracle client connects
1 querying the encoding used by the database
SELECT * from V$nls_parameters;
Variable nls_characterset is the encoding used by the database
2 Setting the Oracle Database encoding system environment variables
Nls_lang=american_america.zhs16gbk
3 Setting Linux system environment variables
A. Modifying a file/etc/profile
Export nls_lang= "American_america. ZHS16GBK "
B. Changes to take effect
Source/etc/profile
C. Viewing system variables
env | grep ' NLS '
Postscript
1 The Windows System environment variable changes and requires a restart before it takes effect
Resources
"1" PHP connection Oracle set character set, avoid garbled
http://blog.csdn.net/linghao00/article/details/7401802
"2" Using php OCI8 with 32-bit php on Windows 64-bit
https://blogs.oracle.com/opal/entry/using_php_oci8_with_32-bit_php
"3" Ora-12705:cannot access NLS data files or invalid environment
Http://stackoverflow.com/questions/7700330/ora-12705-cannot-access-nls-data-files-or-invalid-environment
"4" Linux environment variables
Http://www.cnblogs.com/growup/archive/2011/07/02/2096142.html
Http://www.cnblogs.com/Neddy/archive/2011/03/01/1968018.html
Windows Install PHP Oracle Extensions