0

I wish to run a PHP script to access data from an Oracle DB on another machine. PHP supports OCI8 which is used to access the Oracle DB. But this does not seem to work on Mac OS X Lion. Does anyone know any other way to access data using PHP scripts?

user1342592
  • 49
  • 1
  • 12
  • what didn't work with the php oci8? was the osx oracle driver installed? did you take a look at http://articles.serenity.de/compiling_php_with_oracle/ – MichaelN Jun 01 '12 at 19:36
  • When i try to install oci8 using sudo peck install oci8 it gives me an error as below: Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed I tried rerunning it but no luck. – user1342592 Jun 04 '12 at 20:21
  • is autoconf installed on your mac? Check out http://stackoverflow.com/questions/9322742/php-autoconf-errors-on-mac-os-x-10-7-3-when-trying-to-install-pecl-extensions – MichaelN Jun 05 '12 at 16:11
  • It suggests that I downgrade my Xcode to an earlier version. Isn't there any way using the latest? – user1342592 Jun 07 '12 at 18:43
  • did you try using brew or macport to install autoconf on your osx? – MichaelN Jun 07 '12 at 18:53
  • I installed autoconf manually. Still no luck. This is the error I get:ERROR: `/private/tmp/pear/temp/oci8/configure --with-oci8=instantclient,/usr/lib' failed – user1342592 Jun 08 '12 at 13:29
  • where is your instant client unzipped to? – MichaelN Jun 08 '12 at 13:45
  • did you link the dyn to .so in the instant client unarchive location? you're specifying that the instant client is in /usr/lib, did you put all the oracle instant client into /usr/lib? – MichaelN Jun 08 '12 at 13:51
  • The path mentioned is correct. The lib files are also present but the error says that the lib cannot be found. This is the error: error: Oracle Instant Client libraries libnnz.dylib and libclntsh.dylib not found ERROR: `/private/tmp/pear/temp/oci8/configure --with-oci8=instantclient,/Applications/Develop/oracle/instantclient' failed – user1342592 Jun 08 '12 at 13:56
  • Yes I did.I re-ran the script and now it says the installation was successful. But then it says php.ini not found, where as I am using the php.ini.default. So the oci8 is still not installed – user1342592 Jun 08 '12 at 14:22

2 Answers2

0

Looks like oracle instant client 64 bit are broken for Lion, and there is no workaround. Maybe compiling all 32bit? I didn't try, just using fusion with an ubuntu server with oci8 and instanc client properly working!!!

0

According to the following thread, nothing changed for about 11 months regarding the absence of instant client updates for Mac OS X Lion:

https://forums.oracle.com/forums/thread.jspa?threadID=2318019

Th. Ma.
  • 9,432
  • 5
  • 31
  • 46