Unable to load dynamic library 'oci8_19' in command line

62 Views Asked by At

I tried to generate sql schema using php .\bin\console make:migration in symfony. But I got this error

Warning: PHP Startup: Unable to load dynamic library 'oci8_19' (tried: C:/laragon/bin/php/php-8.2.15-Win32-vs16-x64/ext\oci8_19 (The specified module could not be found), C:/laragon/bin/php/php-8.2.15-Win32-vs16-x64/ext\php_oci8_19.dll (The specified procedure could not be found)) in Unknown on line 0

So I stared searching where is problem and I found strange behaviour.

When I type phpinfo() into code and run it throught browser, oci extension is loaded, everything work fine. But when I type php -i into command line, oci is not loaded.

I dont understand why php does not load oci when it runs throught command line. Any suggestion how to fix it? Thanks

1

There are 1 best solutions below

0
b126 On

Do you have a proper Oracle Instant Client installed on your server? Verify that the client folder is defined in the %PATH% as well as oci.dll. This could be the reason.