Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

paulohsilvestre's avatar

Problem using > php artisan migrate to Oracle database

hello, I have the following problem with the laravel. When I access my site http: // localhost / project Error Code: 942 Error Message: ORA-00942: table or view does not exist Position: 14 Statement: select * from repositories Bindings: [] (SQL: select * from repositories)

He logs on to Oracle database and says that the table does not exist.

when access via console

php artisan migrate

[Symfony \ Component \ Debug \ Exception \ FatalErrorException]    Call to undefined function yajra \ Pdo \ oci_connect ()

someone passed by this problem, how to solve.

I use Mac Osx and my sqlplus operate normally by console also use the MacPort to install the PHP packages.

0 likes
3 replies
christopher's avatar

Try to change the default driver from mysql to sqlsrv. You can also change the driver in your .env file

DB_CONNECTION=sqlsrv

database config:

  'sqlsrv' => array(
   'driver' => 'sqlsrv',
   'host' => 'IP.Adress.Of.Host.Machine', // Provide IP address here
   'database' => 'database',
   'username' => 'root',
   'password' => '',
   'prefix' => '',
  ),
paulohsilvestre's avatar

Tanks Christopher,

I found a problem related to installation of PHP for Mac Port, redid the mapping from the console to the macport because the recently reinstalled PHP55 sudo port select php php55 and there could map the pdo_oci and OCI8 modules, ai worked via console, Thanks for the good intention to help

Please or to participate in this conversation.