cannot connect to oracle 19 with php oci_connect

64 views Asked by At

I know there are other posts (mostly older) about this error, but the solutions don't seem to work for me. My system is Windows 10.

I changed the exensions-dir in php.ini to the full path in php.ini here is the entry from my php.ini:

extension_dir = "C:\Program Files\php-8.2.11-Win32-vs16-x64\ext"

Here is the error:

Fatal error: Uncaught Error: Call to undefined function oci_connect() in C:\Apache24\htdocs\StopCodes\php\openDB.php:9 Stack trace: #0 C:\Apache24\htdocs\StopCodes\php\stopCodes.php(3): require() #1 {main} thrown in C:\Apache24\htdocs\StopCodes\php\openDB.php on line 9

The offending line is:

$ora = oci_connect($ora_username,$ora_password,$ora_connection_string);

Here is my php.ini entry:

extension=oci8_19 

I saw some references to pecl, but I do not have pear. I tried to install pear (I do not have go-pear.bat as I did not install PHP with xamp) so I tried the alternative: copied go-pear.phar and saved it to my php folder.

I got this batch of errors:

C:\Program Files\php-8.2.11-Win32-vs16-x64>"c:\program files\php-8.2.11-Win32-vs16-x64\php" go-pear.phar

Warning: Private methods cannot be final as they are never overridden by other classes in C:\Program Files\php-8.2.11-Win32-vs16-x64\go-pear.phar on line 339
manifest cannot be larger than 100 MB in phar "C:\Program Files\php-8.2.11-Win32-vs16-x64\go-pear.phar"
Warning: require_once(phar://go-pear.phar/index.php): Failed to open stream: manifest cannot be larger than 100 MB in phar "C:\Program Files\php-8.2.11-Win32-vs16-x64\go-pear.phar" in C:\Program Files\php-8.2.11-Win32-vs16-x64\go-pear.phar on line 1284

Fatal error: Uncaught Error: Failed opening required 'phar://go-pear.phar/index.php' (include_path='.;C:\php\pear') in C:\Program Files\php-8.2.11-Win32-vs16-x64\go-pear.phar:1284
Stack trace:
#0 {main}
  thrown in C:\Program Files\php-8.2.11-Win32-vs16-x64\go-pear.phar on line 1284

I am at a loss.

0

There are 0 answers