Oci8 and $Oracle_Home
Hey all,
I've been trying to get Oracle-XE 10G working with PHP on Ubuntu 10.04 (Not server) which is prooving to be quite an experience; I'll try to summerise everything I've done and what I'm having problems with below. Any pointers at all would be great - I feel like I've read everything there is to read about oci8 but I'm obviously missing something.
Nb: I already have Apache2 and PHP installed both of which work well.
Installed Oracle-XE 10G and instant client. Sqlplus works fine.
Installed Pear and PHP5-dev.
Installed Oci8 via Pecl with no errors; phpinfo shows the extension and php --ri oci8 shows that its enabled.
This is where I'm having a problem. I'm running oci_connect('user', 'pass', 'localhost/xe'); and its complaining that I haven't set oracle_home or ld_library_path.
I've made a script in /etc/profile.d which contains:
export oracle_home=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
export ld_library_path=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
I rebooted and the script works, but I still get the same error when I run oci_connect.
I've been trying to get this working for quite a while now, so I'd really appreciate it if someone could tell me what I'm doing wrong / not doing. I'm assuming I need to set the variables somewhere else, but I haven't a clue where since this is the most advanced thing I've ever done with linux.
Cheers,
MIM.