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
./configure --with-mysql=/mysql-4.0.26
3/bin/apxs --with-ldap=/openldap-2.2.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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_oc i8_int.h:5 6: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/in clude
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?
I finally got it to compile. I was getting this error:
In file included from /php-4.4.0/ext/oci8/oci8.c
/php-4.4.0/ext/oci8/php_oc
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/in
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
/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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
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
[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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 = "./"
extension_dir = "./"
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it working (haven't tested in webpages) but at least I got it running.
Thanks.
Thanks.
ASKER
I'll give everything a try, and get back to you. Thank you for your feedback.