0

I'm trying to connect to my database that's Oracle 11, using Doctrine on Symfony 5, and I get these errors, (I have added the OCI8, and oci8_11 to php.ini, and I have activated the oci8_11 extension) :[see attached].1

My connector in the .env is :

DATABASE_URL="oci8://******:*************@192.aaa.aa.aaa:1521/********"
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • The `undefined constant OCI_COMMIT_ON_SUCCESS` exception indicates that the oci extension is not being loaded. What does `php -m` output? What is your php.ini extension line - verbatim? And which version of PHP and/or the PECL oci8 extension are you using? – Will B. Aug 05 '21 at 17:14
  • 2
    Does this answer your question? [Installation of OCI8 : how to correct "Use of undefined constant OCI\_COMMIT\_ON\_SUCCESS" error?](https://stackoverflow.com/questions/46442839/installation-of-oci8-how-to-correct-use-of-undefined-constant-oci-commit-on-s) – Will B. Aug 05 '21 at 17:14
  • PHP 8.0.9 and i use PECL oci8 3.0.1 – Sedik Guellal Aug 08 '21 at 11:27
  • the php -m return : bcmath,bz2,calendar,Core,ctype,curl,date,dom,exif,fileinfo,filter,gd,gettext,gmp,hash,iconv,imap,intl,json,ldap,libxml,mbstring,mysqli,mysqlnd,openssl,pcre,PDO,pdo_mysql,pdo_sqlite,Phar,readline,Reflection,session,SimpleXML,soap,sockets,SPL,standard,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib – Sedik Guellal Aug 08 '21 at 11:30
  • According to the output from `php -m`, it appears that the oci extension is not being loaded, which is the cause of the exception. We'd need a lot more info to troubleshoot, such as the steps you performed to install it. Currently your question is based on the assumption that oci and the prerequisites have been installed and are loading correctly. – Will B. Aug 08 '21 at 13:36
  • for the insrallation , ihave dowload the OCI8 packages from pecl, and then extract the DLL file to wamp/php/php8.0.9/ext and then i've edited the php.ini file and added extention oci8 – Sedik Guellal Aug 09 '21 at 08:46

0 Answers0