0

It's the first time I work with Symfony and Oracle, I have a problem to connect a Oracle11g database to WAMP, I have tried a lot of tutorials but no one work.

I have enabled the php_pdo_oci extension in WAMP. I have downloaded the Oracle client 32bit: Version 11.2.0.4.0, put the files in c:\instantclient_11_2 and add it to PATH.

I have configured parameters.yml and config.yml but when I try to do a request I get the error:

"CRITICAL - Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occured in driver: could not find driver" at ...\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractOracleDriver.php line 76"

I'm on Windows 7 Pro 64, WAMP 32.

2 Answers 2

0

Try to install pdo_oci8 driver and configure your paramaters.yml like this :

   parameters:
        database_driver: oci8
        database_host: hostname
        database_port: '1521'
        database_name: dbname
        database_user: username
Sign up to request clarification or add additional context in comments.

1 Comment

I have installed php_oci8_11g.dll, it's work fine. Thanks
0

Steps to install php_oci8_11g.dll

First, i have moved to a 64bit version of WAMP.

-Download the "Instant Client Package - Basic" for Windows.Choose your version(64 bit) for me.

-Unzip it to c:\instantclient_11_2

-Edit the PATH environment setting and add c:\instant_11_2 before any other Oracle directories (to be sure put it on the begin of the variable)

-Restart your computer for environment variables to effect

-Now go to your php.ini file and add/uncomment the line

extension=php_oci8_11g.dll

-Save php.ini file

-Download the actual Thread Safe OCI-DLLs from pecl.php.net choose your version (I'm using PHP 5.6 so i get the 2.0.12)

-Unzip OCI-DLLs Zip file and copy all files from this folder to Extensions directory of PHP (php/ext)

-Restart WAMP

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.