Discussions
Categories
- 196.9K All Categories
- 2.2K Data
- 239 Big Data Appliance
- 1.9K Data Science
- 450.4K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 546 SQLcl
- 4K SQL Developer Data Modeler
- 187.1K SQL & PL/SQL
- 21.3K SQL Developer
- 295.9K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.6K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 443 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
Connection PHP with Oracle 11g
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!!
Best 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
-
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)
-
All requirements for the Oracle Instant Client are checked and correct, but the error persists.
-
If everything is correct, then it would be working
Triple check. Try running PHP from a command shell. Check what other Oracle software you have installed.
-
I configured again the Oracle Instant Client and it works now.
-
i need help for my oci please.
i want to connect my php with oracle i dowload instant client12_2 i unzip the file and set the path i and uncomment extension=php_oci8_12c.dll but oci doesnot show up in phpinfos.
-
Check the installation instructions e.g. Installing PHP and the Oracle Instant Client for Linux and Windows - Updated for DB 12c and open a new issue if you continue to have problems.
-
hi master ,
can you help me please to connect to my oracle db with sys privileges with php this my code : i always get error ( Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA )
in php.ini i putted : oci8.privileged_connect = on
$SYS="SYS";
$ope="opera10g";
$c = oci_connect($SYS, $ope, 'mylocalip/OPERA', null, OCI_SYSDBA);
thx for helping me
-
dbbeaf3f-ad15-4c13-9377-d5bed3611fa2 please open new issues for new problems so we can see them promptly.
Make sure you are updating the correct php.ini file. Check what phpinfo() shows you.