简体   繁体   中英

How to connect Laravel 8 to oracle 11g database?

I'm trying to connect Laravel 8 to the Oracle 11g database, I tried all possible solutions but it didn't work. Here are my system properties:

  1. Windows 8.1 64 bits.
  2. Laravel 8.
  3. Oracle 11g.
  4. Xampp 64 bits.
  5. PHP 7.4.10

This is the error message: C:\\xampp\\htdocs>composer require yajra/laravel-oci8 PHP Warning: PHP Startup: Unable to load dynamic library 'php_oci8_11g' (tried: C:\\xampp\\php\\ext\\php_oci8_11g (%1 is not a valid Win32 application.), C:\\xampp
php\\ext\\php_php_oci8_11g.dll (The specified module could not be found.)) in Unkn own on line 0 . . . The following image clarifies the problem: 在此处输入图片说明

您需要在 php.ini 文件中取消注释extension=oci8_12c并确保ext文件夹中的php_oci8_12c.dll文件。

Uncomment extension=oci8_12c by removing ; before it in you php.ini and then relaod php-fpm using service php-fpm restart or service php7-fpm restart replace 7 with your php version.

It seems it is moved to pecl , download dll file and place that in xampp\\php\\ext\\ directory. if exists replace it, restart your xampp and it should be okay now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM