Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache FastGCI & PHP module oci8 |
|
Author |
|
mpiche
Joined: 10 Apr 2008 Posts: 9
|
Posted: Thu 10 Apr '08 1:14 Post subject: Apache FastGCI & PHP module oci8 |
|
|
We are running Apache 2.2.8 from ApacheLounge and PHP 5.2.5 on Windows 2003 Server. We currently run PHP a an Apache module, but we want to swith to FastCGI to improve performances and stability. So I change my Apache config to load FastCGI and comment the PHP module. Everything is working fine except the oci8 module in PHP. I got the following error in my PHP error log :
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_oci8.dll' - The specified module could not be found. in Unknown on line 0
When I switch back to PHP as a module, oci8 is working fine. Does anyone have an idea ?
Thanks for the help ! |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Thu 10 Apr '08 4:07 Post subject: |
|
|
php_oci8.dll needs to be able to find your Oracle oci.dll file. Usually this is in an Oracle \bin directory which can be found in your Windows PATH environment variable.
When you use FastCGI you need to specify any required environment variables explicitly in httpd.conf.
You should make sure that the PATH variable contains the directory with oci.dll in it.
You may also need to specify an ORA_HOME variable depending how Oracle was installed on your system.
There are two kinds of FastCGI - mod_fcgid, which is available on the Apache Lounge Downloads page - and the traditional mod_fastcgi.
It isn't clear from your post which one you are using.
If you use mod_fcgid - you need directives which look like this: Code: | DefaultInitEnv PHPRC "C:/PHP525/"
DefaultInitEnv PATH "C:/PHP525;C:/Apache2/bin;C:/WINDOWS/system32;C:/WINDOWS;C:/Oracle/BIN"
DefaultInitEnv ORA_HOME "C:/Oracle" |
If you use mod_fastcgi, it will look like this: Code: | FastCgiConfig \
-initial-env PHPRC="C:/PHP525" \
-initial-env PATH="C:/PHP525;C:/Apache2/bin;C:/WINDOWS/system32;C:/WINDOWS;C:/Oracle/BIN" \
-initial-env ORA_HOME="C:/Oracle" | ... presuming Oracle is installed in C:\Oracle.
Oracle might be in a different location, like C:\oraclexe\app\oracle\product\10.2.0\server or C:\Program Files\Oracle\8.1.7
Hope this helps,
-tom- |
|
Back to top |
|
mpiche
Joined: 10 Apr 2008 Posts: 9
|
Posted: Thu 10 Apr '08 15:56 Post subject: |
|
|
I'm using mod_fcgid and adding "DefaultInitEnv PATH ... " solved my problem.
Thank you for your help. |
|
Back to top |
|
|
|
|
|
|