How to use PHP & Oracle (oci8) Config OCI8 for php This is the guideline/example scripts how to use PHP and Oracle Database , Config php support oci function.
ShotDev Focus:
- PHP & config oci function
Solution
Fatal error: Call to undefined function oci_connect() in C:\AppServ\www\myphp\php_oracle.php on line 7
..
PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/AppServ\php5\ext\php_oci8.dll’ - The specified
procedure could not be found.\r\n in Unknown on line 0
..
Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with
your system - please check that PATH includes the directory with
Oracle Instance Client libraries in C:\AppServ\www\myphp\php_oracle.php on line 7
..
Warning: oci_connect() [function.oci-connect]: ORA-12705: Cannot access NLS data files or invalid environment
specified in C:\AppServ\www\myphp\php_oracle.php on line 7
Solve Problem
Step 1
Oracle Instance Client Download file oraociei10.dll,orannzsbb10.dll,oci.dll
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html Version 10.2.0.4
Step 2
Copy file oraociei10.dll,orannzsbb10.dll,oci.dll
to C:\Windows\System32
Step 3
Change Registry NLS_LANG
Start -> Run -> Regedit -> HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> NLS_LANG
*** Delete or input Null value
Step 4
Copy php_oci8.dll to extension folder. ….. download file php_oci8.dll
and open oci function php.ini
Start -> Run -> php.ini
check extestion folder
copy file to C:/Appserv\php5\ext
remove (;) at line php_oci8.dll
Restart Web Server
Test oci function
<? phpinfo(); ?>
Screenshot
1description…
…