This content has been marked as final. Show 14 replies
The PHP OCI8 extension and PDO_OCI adapter use Oracle Call Interface APIs. If you use either of these two layers, you will need to build PHP with Oracle libraries which have these APIs. These libraries are included in the Oracle Database $ORACLE_HOME/lib directory, or are available with Oracle Client (installed via Oracle Installer), or in Oracle Instant Client (installed via ZIP or RPM).
For some notes on installing with OHS, see https://blogs.oracle.com/opal/entry/building_php_53_with_oracle_ht or info on the older version is in the Underground PHP & Oracle Manual.
I'm following the article:
Download the FastCGI component mod_fcgid-2.3.6-win32-x86.zip
since I already have OHS.
However when I Unzip the latest version of mod_fcgid for my OS the mod_fcgid.so and mod_fcgid.pdb files never appeared.
What do I do now?
You possibly got the source code? The http://httpd.apache.org/download.cgi page doesn't have a link to the current Window's fcgid binaries (perhaps they are waiting for a build of the latest version?) If you look at links to other Apache Window binaries, you can navigate to that directory and locate the 2.3.6 fcgid binary zip, e.g. from http://apache.cs.utah.edu//httpd/binaries/win32/
Let us know how it goes with OHS. I'm curious to know if it works on Windows.
Appreciate you trying to help us with this.
We followed this... http://www.oracle.com/technetwork/articles/dsl/inst-php-apache-windows-098333.html
But, when we restarted the HTTP server, we received this error in the log:
Apache.exe: Syntax error on line 206 of D:\\oracle\\product\\fmwfr\\frinst1\\config\\OHS\\ohs1/httpd.conf: Cannot load D:/oracle/product/fmwfr/Oracle_FR1/ohs/modules/mod_fcgid.so into server: %1 is not a valid Win32 application.
Yes you will need Instant Client if you have no Oracle database libraries on the machine where PHP is installed.
You could try the old non-fastcgi installation, but I suspect you'll have similar binary compatibility issues. These are common on Windows. The OHS, mod_fcgid and PHP binaries are all built separately, giving potential binary version issues as the tool chains vary. For a while PHP binaries were not compatible with Apache binaries at all. People commonly see 32 bit vs 64 bit issues too.
My best bet for you would be to install standalone Apache with PHP using a different port, and set up a reverse proxy to it from OHS or vice versa.
My favorite option is to use Linux.
I struggled with getting conned to oracle for a while until I figured it out. We run IIS 6 on Windows 2003. You need to set up the instant client libaries in a folder (set the path in your windows environment variables) then you need to install Visual Studio C++ express. PHP will not install oci8 properly because there are missing dll files which installing VS C++ express will fix. once you see oci8 come up in you phpinfo() you should be good to go. You should be able to connect like this...
// IP - PORT - DATABASE INSTANCE
define('ORACLE_HOST','123.456.789.123:4567/dev'); // Testing
//OPEN ORACLE CONNECTION
$conn = oci_connect(ORACLE_USERNAME, ORACLE_PASSWORD, ORACLE_HOST);