How does php read oracle RT? extension = php_oci8_11g.dll has been enabled in php. ini. the oci information cannot be seen in phpinfo. What other configurations do I need? Oracle11g
Reply to discussion (solution)
Clients requiring oracle11g installation
Since oracle 9, its client has been released independently, and php has no need to bind the client.
Therefore, only interfaces php_oci8 and php_oci8_11g for communication with the client are provided.
Because the oracle11g client has made great changes, there is a connection to php_oci8_11g, mainly to use the new features of oracle.
Clients requiring oracle11g installation
Since oracle 9, its client has been released independently, and php has no need to bind the client.
Therefore, only interfaces php_oci8 and php_oci8_11g for communication with the client are provided.
Because the oracle11g client has made great changes, there is a connection to php_oci8_11g, mainly to use the new features of oracle.
Thank you, this great god. I am a little white, basically according to the 64-bit oracle installation in this article
Http://blog.sina.com.cn/s/blog_868ba3570101djuh.html
I have a 32-bit client, but the tnsnames. ora file he mentioned is not found under % Oracle_Home % \ NETWORK \ ADMIN. What should I do next?
Look at this http://download.csdn.net/download/eisjmo/4362471
I haven't finished it for a long time, and I can't remember the details.
However, you only need setup in the image, and there is nothing to configure.
I haven't finished it for a long time, and I can't remember the details.
However, you only need setup in the image, and there is nothing to configure.
Now there is a new situation, I simply test the connection to the database, reported Warning: oci_connect (): ORA-12154: TNS: cocould not resolve the connect identifier specified in C: \ xampp \ htdocs \ phpwork1 \ test. php on line 17
ORA-12154: TNS: cocould not resolve the connect identifier specified
Environment variables are also configured.
Paste your code
Paste your code
'; While ($ row = oci_fetch_array ($ stid, OCI_RETURN_NULLS) {print''; Foreach ($ row as $ item) {print''. ($ Item? Htmlentities ($ item ):'').'';} Print'';} Print''; Oci_close ($ conn) ;?>
Is a section in the php Manual.
Use PDO instead.
Use PDO instead.
Thank you! I used pdo to return similar information...
SQLSTATE [42S02]: pdo_oci_handle_factory: ORA-12154: TNS: cocould not resolve the connect identifier specified (ext \ pdo_oci \ oci_driver.c: 633)
Code
$tns="aaa";try{$conn=new PDO("oci:dbname=".$tns, 'system', '123456');}catch(PDOException $e){echo ($e->getMessage());}
In addition, why does my PDO_OCI have no hair? in php. ini, extension = php_pdo_oci.dll has been started.
$ Db = new PDO ('Oss: dbname = // machine name or ip: 1521/instance name', 'username', 'password ');
$ Rs = $ db-> query ('SQL directive ');
$ Db = new PDO ('Oss: dbname = // machine name or ip: 1521/instance name', 'username', 'password ');
$ Rs = $ db-> query ('SQL directive ');
Successful! Thank you for your patience !! 32 likes for you !!