Forum Stats

  • 3,827,682 Users
  • 2,260,803 Discussions
  • 7,897,336 Comments

Discussions

Connection PHP with Oracle 11g

3717302
3717302 Member Posts: 3
edited Jul 25, 2018 10:49PM in PHP

I need help for make connection PHP with Oracle, I did install extensions and Oracle Instant Client but i don't can connect in database. The extensions is enable but the apache don't can to read the extensions. The apache generate this error log :

[Tue May 29 18:51:06.093359 2018] [ssl:warn] [pid 1120:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Tue May 29 18:51:06.374160 2018] [core:warn] [pid 1120:tid 768] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Tue May 29 18:51:06.374160 2018] [ssl:warn] [pid 1120:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

PHP Warning: PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: C:\\xampp\\php\\ext\\oci8_12c (N\xef\xbf\xbdo foi poss\xef\xbf\xbdvel encontrar o m\xef\xbf\xbddulo especificado.), C:\\xampp\\php\\ext\\php_oci8_12c.dll (%1 n\xef\xbf\xbdo \xef\xbf\xbd um aplicativo Win32 v\xef\xbf\xbdlido.)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: C:\\xampp\\php\\ext\\pdo_oci (N\xef\xbf\xbdo foi poss\xef\xbf\xbdvel encontrar o m\xef\xbf\xbddulo especificado.), C:\\xampp\\php\\ext\\php_pdo_oci.dll (%1 n\xef\xbf\xbdo \xef\xbf\xbd um aplicativo Win32 v\xef\xbf\xbdlido.)) in Unknown on line 0

[Tue May 29 18:51:06.514560 2018] [mpm_winnt:notice] [pid 1120:tid 768] AH00455: Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.5 configured -- resuming normal operations

[Tue May 29 18:51:06.514560 2018] [mpm_winnt:notice] [pid 1120:tid 768] AH00456: Apache Lounge VC15 Server built: Mar 28 2018 12:12:41

[Tue May 29 18:51:06.514560 2018] [core:notice] [pid 1120:tid 768] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'

[Tue May 29 18:51:06.603261 2018] [mpm_winnt:notice] [pid 1120:tid 768] AH00418: Parent: Created child process 3768

[Tue May 29 18:51:08.297385 2018] [ssl:warn] [pid 3768:tid 784] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Tue May 29 18:51:08.555388 2018] [ssl:warn] [pid 3768:tid 784] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

PHP Warning: PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: C:\\xampp\\php\\ext\\oci8_12c (N\xef\xbf\xbdo foi poss\xef\xbf\xbdvel encontrar o m\xef\xbf\xbddulo especificado.), C:\\xampp\\php\\ext\\php_oci8_12c.dll (%1 n\xef\xbf\xbdo \xef\xbf\xbd um aplicativo Win32 v\xef\xbf\xbdlido.)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_oci' (tried: C:\\xampp\\php\\ext\\pdo_oci (N\xef\xbf\xbdo foi poss\xef\xbf\xbdvel encontrar o m\xef\xbf\xbddulo especificado.), C:\\xampp\\php\\ext\\php_pdo_oci.dll (%1 n\xef\xbf\xbdo \xef\xbf\xbd um aplicativo Win32 v\xef\xbf\xbdlido.)) in Unknown on line 0

[Tue May 29 18:51:08.698288 2018] [mpm_winnt:notice] [pid 3768:tid 784] AH00354: Child: Starting 150 worker threads.

[Tue May 29 18:51:15.738534 2018] [php7:error] [pid 3768:tid 2080] [client ::1:49534] PHP Fatal error: Uncaught Error: Call to undefined function oci_connect() in C:\\xampp\\htdocs\\test.php:2\nStack trace:\n#0 {main}\n thrown in C:\\xampp\\htdocs\\test.php on line 2

Thank's!!

Tagged:

Best Answer

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee
    edited Jun 4, 2018 1:29AM Answer ✓

    If I read that correctly there is an error loading the oci8 and PDO_OCI extensions.  Check you have PATH set to the Oracle Instant Client. Make sure you have the same 32 or 64 bit Instant Client that matches PHP's architecture. Make sure you have the matching VS Redistributable (shown on the Instant Client pages)

Answers

This discussion has been closed.