[英]Unable to load dynamic library 'php_oci8_11g.dll'
Please help me to connect the oracle database 11g through Laravel 5.7 请帮助我通过Laravel 5.7连接Oracle数据库11g
I spend 4 days still don't make it out just drive me crazy 我花了4天仍然没有做到,只是让我发疯
My config: 我的配置:
Win7-Sp1-64Bit,Xampp-v3.2.2,PHP-7.2.1,Laravel-5.7.1
I placed the file 我放置了文件
OCI8-php_oci8-2.1.8-7.2-ts-vc15-x64 (oci8.dll,oci8_11r.dll, oci8_12g.dll)
in xampp/php/ext 在xampp / php / ext中
I've created Environment Variables in User variables & System variables : 我已经在用户变量和系统变量中创建了环境变量 :
PATH: C:\\instantclient_18_3 or C:\\instantclient_12_2
路径: C:\\instantclient_18_3 or C:\\instantclient_12_2
TNS_ADMIN: C:\\instantclient_18_3 or C:\\instantclient_12_2
TNS_ADMIN: C:\\instantclient_18_3 or C:\\instantclient_12_2
。Also tried to install: 。还尝试安装:
32bit-instantclient-basic-nt-12.2.0.1.0.zip
32bit-instantclient-basic-nt-12.1.0.2.0.zip
64bit-instantclient-basic-windows.x64-18.3.0.0.0dbru.zip
64bit-instantclient-basic-windows.x64-12.2.0.1.0.zip
OCI8 still can't be loaded in http://localhost/index.php OCI8仍无法在http://localhost/index.php中加载
and I run the command php -m still come out the same result: 并且我运行命令php -m仍然得出相同的结果:
Warning: PHP Startup: Unable to load dynamic library 'php_oci8_11g.dll' (tried: C:\\xampp\\php\\ext\\php_oci8_11g.dll (%1 is not a valid Win32 application.), C:\\xampp\\php\\ext\\php_php_oci8_11g.dll.dll (The specified module could not be found.)) in Unknown on line 0 警告:PHP启动:无法加载动态库'php_oci8_11g.dll'(尝试:C:\\ xampp \\ php \\ ext \\ php_oci8_11g.dll(%1无效的Win32应用程序。),C:\\ xampp \\ php \\ ext第0行上的\\ php_php_oci8_11g.dll.dll(找不到指定的模块。)
PHP Warning: PHP Startup: Unable to load dynamic library 'php_oci8_12c.dll' (tried: C:\\xampp\\php\\ext\\php_oci8_12c.dll (%1 is not a valid Win32 application.), C:\\xampp\\php\\ext\\php_php_oci8_12c.dll.dll (The specified module could not be found.)) in Unknown on line 0 PHP警告:PHP启动:无法加载动态库'php_oci8_12c.dll'(尝试:C:\\ xampp \\ php \\ ext \\ php_oci8_12c.dll(%1不是有效的Win32应用程序。),C:\\ xampp \\ php \\ ext \\ php_php_oci8_12c.dll.dll(找不到指定的模块。)在第0行上的“未知”中
Finally I found an article which is close to my config 最后,我找到了一篇与我的配置接近的文章
https://blogs.oracle.com/opal/installing-xampp-for-php-and-oracle-database https://blogs.oracle.com/opal/installing-xampp-for-php-and-oracle-database
Doing all the things on this article then 然后做这篇文章中的所有事情
Add oci.dll, oraociei12.dll, and oraons.dll to apache/bin folder. 将oci.dll,oraociei12.dll和oraons.dll添加到apache / bin文件夹中。 Replace the existing one 替换现有的
Restart the Apache.. 重新启动Apache。
Things are being done! 事情正在完成!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.