我已经在PHP和Apache中启用了extension=php_pdo_oci.dll,我也重新启动了wampserver,但仍然没有这个错误Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'“我不知道你在胡说什么。”先谢谢你。
extension=php_pdo_oci.dll
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'
h43kikqp1#
您必须安装PDO Oracle驱动程序适配器:http://php.net/manual/en/ref.pdo-oci.php
huwehgph2#
您可以在配置文件中设置变量:在Ubuntu上,在/etc/apache 2/envars中:
export CLIENT_LOCALE=en_US.CP1252 export ORACLE_HOME=/opt/oracle/instantclient_12_1 export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1 export NLS_LANG AMERICAN
或者在vhost配置中:
<VirtualHost *:443> ServerName oracleapp.example.org SSLEngine on SSLCertificateFile /etc/ssl/certs/wildcard_example.org.pem SSLCertificateKeyFile /etc/ssl/certs/wildcard_example.org.key SSLCACertificateFile /etc/ssl/certs/wildcard_example.org.chain DocumentRoot /var/www/html <Directory /var/www/html> AllowOverride All </Directory> SetEnv ORACLE_HOME /opt/oracle/instantclient_12_1 SetEnv LD_LIBRARY_PATH /opt/oracle/instantclient_12_1 SetEnv NLS_LANG AMERICAN ErrorLog ${APACHE_LOG_DIR}/oracleapp.example.org-ssl-error_log CustomLog ${APACHE_LOG_DIR}/oracleapp.example.org-ssl-access_log common </VirtualHost>
2条答案
按热度按时间h43kikqp1#
您必须安装PDO Oracle驱动程序适配器:
http://php.net/manual/en/ref.pdo-oci.php
huwehgph2#
您可以在配置文件中设置变量:
在Ubuntu上,在/etc/apache 2/envars中:
或者在vhost配置中: