Hi Rene,
It's not easy to get working. I believe the Instant Client files end up in 
/opt/local/lib/oracle after MacPorts installs them. I had to open 
/opt/apache2/bin/envvars and add:

DYLD_LIBRARY_PATH="/opt/local/lib/oracle/:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH

then restart Apache to get it working.

John Korchok

From: [email protected]
Subject: Problems getting oracle client working with PHP5
Date: Mon, 11 Jul 2011 11:32:06 -0600
To: [email protected]



I need to access a remote Oracle database via PHP, and I'm having some trouble. 
So far, I've followed the instructions...
- Downloaded:   instantclient-basic-10.2.0.4.0-macosx-x64.zip   
instantclient-sdk-10.2.0.4.0-macosx-x64.zip  To:        
/opt/local/var/macports/distfiles/oracle-instantclient
- Ran:  sudo port install oracle-instantclient  sudo port install php5-oracle
No errors, seems installed. However, phpinfo() reveals no mention of Oracle or 
OCI8, etc.And when I try: 
if ($c = oci_connect("hr", "hr_password", "localhost/XE")) {    echo 
"Successfully connected to Oracle."; oci_close($c);        }
I get:
Fatal error: Call to undefined function oci_connect()...
So... it appears although the Oracle stuff is installed, it doesn't seem to be 
active, in spite of what Macports reports: sudo port installed:
The following ports are currently installed:
  apache2 @2.2.19_0+preforkmpm (active)
...  oracle-instantclient @10.2.0.4.0_4 (active)...  php5-mysql 
@5.3.6_0+mysqlnd (active)
  php5-openssl @5.3.6_0 (active)
  php5-oracle @5.3.6_0 (active)
  php5-sockets @5.3.6_0 (active)
...

Any suggestions what I'm missing?
...Rene

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users                 
                          
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to