Michael Brewster Michael Brewster - 1 month ago 16x
PHP Question

Oci8Exception in Oci8.php line 466

Attempting to connect to an Oracle database with yajra/laravel-oci8, below is the configuration. Note that I've also installed the instant client 11g corresponding to the bit version of Windows Server. I've ensured that the 11g ext is enabled in the php.ini.


Spent 4 days on this now, does anybody have any idea what's going on?

I don't even get an error message, just a stack dump which is attached.

'oracle' => [
'driver' => 'oracle',
'tns' => 'LISTENER',
'host' => '',
'port' => env('DB_PORT', '1521'),
'database' => 'QORA',
'username' => 'ETEST',
'password' => 'ETEST',
'charset' => env('DB_CHARSET', 'AL32UTF8'),
'prefix' => env('DB_PREFIX', ''),
'prefix_schema' => env('DB_SCHEMA_PREFIX', ''),


Your error messages are showing you are trying to connect on port 3306, which is the standard MySQL port. According to your config, you're looking at the DB_PORT value from the .env file, with a backup of 1521 if that doesn't exist.

My guess is that your .env file has the following line:


You either need to comment or remove that line, or change 3306 to 1521.