php pdo 连接oracle,php,pdo怎么连接oracle数据库

php.ini

;extension=php_bz2.dll

extension=php_curl.dll

;extension=php_dba.dll

;extension=php_dbase.dll

extension=php_exif.dll

;extension=php_fdf.dll

extension=php_gd2.dll

;extension=php_gettext.dll

;extension=php_gmp.dll

;extension=php_ifx.dll

;extension=php_imap.dll

;extension=php_interbase.dll

;extension=php_ldap.dll

extension=php_mbstring.dll

;extension=php_mcrypt.dll

;extension=php_mhash.dll

;extension=php_mime_magic.dll

;extension=php_ming.dll

;extension=php_msql.dll

;extension=php_mssql.dll

extension=php_mysql.dll

extension=php_mysqli.dll

extension=php_oci8.dll

;extension=php_openssl.dll

extension=php_pdo.dll

extension=php_pdo_firebird.dll

extension=php_pdo_mssql.dll

extension=php_pdo_mysql.dll

extension=php_pdo_oci.dll

extension=php_pdo_oci8.dll

extension=php_pdo_odbc.dll

extension=php_pdo_pgsql.dll

extension=php_pdo_sqlite.dll

;extension=php_pgsql.dll

;extension=php_pspell.dll

;extension=php_shmop.dll

;extension=php_snmp.dll

;extension=php_soap.dll

extension=php_sockets.dll

extension=php_sqlite.dll

;extension=php_sybase_ct.dll

;extension=php_tidy.dll

;extension=php_xmlrpc.dll

;extension=php_xsl.dll

;extension=php_zip.dll

php代码

new PDO("oci:dbname=//192.168.175.40:1521/ORCL,demo,demo");

phpinfo

4b80167781a891b3ce8f40a2c9b0945f.png

错误

pdo_oci_handle_factory: ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 (ext\pdo_oci\oci_driver.c:581)222

回复内容:

php.ini

;extension=php_bz2.dll

extension=php_curl.dll

;extension=php_dba.dll

;extension=php_dbase.dll

extension=php_exif.dll

;extension=php_fdf.dll

extension=php_gd2.dll

;extension=php_gettext.dll

;extension=php_gmp.dll

;extension=php_ifx.dll

;extension=php_imap.dll

;extension=php_interbase.dll

;extension=php_ldap.dll

extension=php_mbstring.dll

;extension=php_mcrypt.dll

;extension=php_mhash.dll

;extension=php_mime_magic.dll

;extension=php_ming.dll

;extension=php_msql.dll

;extension=php_mssql.dll

extension=php_mysql.dll

extension=php_mysqli.dll

extension=php_oci8.dll

;extension=php_openssl.dll

extension=php_pdo.dll

extension=php_pdo_firebird.dll

extension=php_pdo_mssql.dll

extension=php_pdo_mysql.dll

extension=php_pdo_oci.dll

extension=php_pdo_oci8.dll

extension=php_pdo_odbc.dll

extension=php_pdo_pgsql.dll

extension=php_pdo_sqlite.dll

;extension=php_pgsql.dll

;extension=php_pspell.dll

;extension=php_shmop.dll

;extension=php_snmp.dll

;extension=php_soap.dll

extension=php_sockets.dll

extension=php_sqlite.dll

;extension=php_sybase_ct.dll

;extension=php_tidy.dll

;extension=php_xmlrpc.dll

;extension=php_xsl.dll

;extension=php_zip.dll

php代码

new PDO("oci:dbname=//192.168.175.40:1521/ORCL,demo,demo");

phpinfo

4b80167781a891b3ce8f40a2c9b0945f.png

错误

pdo_oci_handle_factory: ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 (ext\pdo_oci\oci_driver.c:581)222

请先安装oracle 的客户端,能够用客户端访问oracle了,才能够加载

我PHP 连接Oracle,第一次非常慢,30~45秒,之后就非常快。

这个楼主是如何解决的。

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
相关推荐
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页