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
Install instructions for windows81. pc + version for php newbie wishing to use php to access data re

Hi All,
Have a windows 8.1 pc. New to php and have enabled IIS on pc and now wish to install php in order to use php to connect and pull data from oracle 11.2.0.4 database
Saw a link on microsoft site but only mentioned sql drivers no mention of oracle.
Anyone know of good link/instructions to install as simply as possible and any steps needed afterwards.
Thanks
Answers
-
There's a plethora of great articles available from Oracle
Installing PHP and the Oracle Instant Client for Linux and Windows (11g)
Installing PHP and the Oracle Instant Client for Linux and Windows - Updated for DB 12c
If you are installing php on the same server the Oracle database is on, then this may help
https://docs.oracle.com/cd/E17781_01/appdev.112/e18555/ch_two.htm#TDPPH132
Here's a great manual, it is free.
The Underground PHP and Oracle Manual | Homepage
Cheers,
Gaz.
-
Thanks for reply.
I already have standard oracle client but getting message below when try and include file containing connection string - not sure difference ebtween instant client and standard oracle client - will try isntalling oracle instant client.
PHP Fatal error: Uncaught Error: Call to undefined function oci_connect()
-
Depending on versions of things, you may not need an instant client. If you do download an instant client, you need to download the one with the same architecture as php you have. Either both 32bit or both 64bit.
Also, depending on your Oracle client version, php version, you may need to download oci8 from here:
http://pecl.php.net/package/oci8
Questions:
1. Oracle client version and architecture?
2. php version and architecture?
3. oci8 version and architecture?
4. Does you oracle client work as expected?
c:\> sqlplus user/[email protected]
5. Using "phpinfo()" is oci8 mentioned in the output?
6. Have you added a line like this to your php.ini?
<span class="pln">extension</span><span class="pun">=</span><span class="pln">php_oci8</span><span class="pun">.</span><span class="pln">dll</span>
-
HI,
1)Have oracle 11.2.0.3 remote database oracle instant client n 12.2.0.1.0 (32-bit) on pc - also have another 11.2.0.3 client on pc added the instant client to PATH in fast-cgi
2)php
7.1.3 oracle
3) don't understand this part have extension=php_oci8_12c.dll ; but no seaparate oci8 install - is there something diffrent to install for this?
4) sqlplus gives ORA-12560: TNS protocol adapter error.
However, can connect with 3rd party tools suhc as pl/sql developer and oracle tools such as warehouse builder to the database concerned.
Have standard oracle client and also installed oracle instant 12c client as backward-compatible don't understand difference between oracel client and oracle instant client.
5) using phpinfo oci8 mentioned in configure command but don't see it enabled as separate section in way another colleague does so looks like not enabled for some reason despite
6) uncommented extnestion line below in php.ini
extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
-
If 5. (running phpinfo()) shows no oci8 section then your configuration is incorrect. If your colleague has a working configuration then just copy theirs.
-
- Thanks - tried that but still no joy
sqlplus work
hat is the difference between instant client and oracle client - other applications working with oracle client o.k proving oracle client o.k and php looks to work
Would have thought would simply be able to use the oracle client libraries by uncommenting the relevant dll in the php.ini file.
-
php 5.6 is supported with Oracle 11.2 client.
Oracle instant client 12.2 may support php 7... You need to setup oracle 12.2 instant client up properly.
-
> Would have thought would simply be able to use the oracle client libraries by uncommenting the relevant dll in the php.ini file.
You can - as long as you have the right Oracle client libraries in your path. But you have have multiple Oracle client libraries installed. So you either have a clash, or haven't configured IIS so PHP can access the Oracle client libraries, or are not using the correct PHP OCI8 dll for the version of the Oracle client libraries you have.
The following comments on PHP & IIS are old, but no IIS user has ever given me updates: https://blogs.oracle.com/opal/entry/how_to_use_iis_php_and_oracle
SQL*Developer commonly connects in a completely different tech stack, so what happens with it isn't relevant to PHP OCI8.
Anyway, check with your colleague who has it working.
-
Thanks for reply.
Have tried setting up TNS_ADMIN environment and checked with colleague.
Our oracle client directory in the PATH
He has no ISUR_machine name security privileges explicitly set.
I have set up security similar to him with full control for uses and administrators on the machine.
I believe this by default should include the account under which the ISUR is running.
Have also tried with version php_oci8.dll and php_oci8_11g.dll - still same message
php error log gives message below - file definitely exists
[10-Apr-2017 08:57:27 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_oci8_12c.dll' - The specified module could not be found.
Any idea why it cannot find it?