Problems getting oracle client working with PHP5

René Fournier m5 at renefournier.com
Mon Jul 11 10:32:06 PDT 2011


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110711/aa38ba39/attachment.html>


More information about the macports-users mailing list