Link to home
Start Free TrialLog in
Avatar of kalmen
kalmen

asked on

Introducing Oracle to PHP/Apache

I have a UNIX website running Apache 1.3.33 and PHP 4.4.0 and I have compiled it with the following options:

./configure --with-mysql=/mysql-4.0.26 --with-apxs=/apache_1.3.3
3/bin/apxs --with-ldap=/openldap-2.2.26

Now I am introducing Oracle to the scene. we have Oracle 9 server and I would like  to know what is involved in using Oracle SQL with PHP and Apache. I'd like to know if it there is an easy way, or if I need to recompile.

My oracle client has been installed at:
/oracle/product/10.2.0 by our DBA, I have no idea what to do with that.


Thanks
ASKER CERTIFIED SOLUTION
Avatar of psimation
psimation
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalmen
kalmen

ASKER

Hi All,

I'll give everything a try, and get back to you. Thank you for your feedback.

Avatar of kalmen

ASKER

Hi There,

I finally got it to compile. I was getting this error:
In file included from /php-4.4.0/ext/oci8/oci8.c:50:
/php-4.4.0/ext/oci8/php_oci8_int.h:56:17: oci.h: No such file or directory

So I downloaded the sdk from oracle that had the oci.h and added it to the makefile:
EXTRA_INCLUDES = -I /instantclient_10_2/sdk/include

Then I got a folder called modules that has two oci8 files. I moved them to /usr/local/lib and added them to the php.ini:
extension=oci8.so

But when I restart nothing works... Any idea on troubleshooting?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalmen

ASKER

Actually, our DBA installed it for me, it is at:
/oracle/product/10.2.0
# ls
DISK              css               instantclient32   jpub              odbc              perl              root.sh.old       tg4ifmx
OPatch            diagnostics       inventory         jre               olap              plsql             slax              tg4ingr
assistants        has               jar               ldap              oraInst.loc       precomp           sqlj              tg4sybs
bin               hs                javavm            lib               oracore           racg              sqlnet.log        tg4tera
cfgtoollogs       install           jdbc              lib32             ord               rdbms             sqlplus           uix
classes           install.platform  jdk               network           oui               relnotes          srvm              wwg
crs               instantclient     jlib              nls               owm               root.sh           sysman            xdk
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalmen

ASKER

The compilation worked even better this time. But, I still can't get apache to work... Am I putting the so files in the right place? Am I missing a variable or something?
Avatar of kalmen

ASKER

Here is an error message:

[Thu Nov  8 09:17:42 2007] [notice] mod_security/1.9.4 configured - Apache/1.3.33 (Unix)
PHP Warning:  PHP Startup: Unable to load dynamic library './oci8.so' - ld.so.1: httpd: fatal: ./oci8.so: open failed: No such file or directory in Unknown on line 0
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalmen

ASKER

Well, I put the file in the /usr/local/lib/ and php.ini exists in the same place. This is the line in the ini file.
extension_dir = "./"

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalmen

ASKER

Got it working (haven't tested in webpages) but at least I got it running.

Thanks.