Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#13530 closed enhancement (fixed)

php5: add support for oracle / oci8

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: Cc: jkorchok@…
Port:

Description

John Korchok requests that the php5 port should support oracle / oci8.

This means we first need a port to install the oracle libraries, probably in the form of the freely-available instantclient.

I'm looking into this.

Change History (5)

comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

There are some problems with the instantclient:

  1. It's a binary installation, and it's only available for PowerPC Macs at this time, not Intel Macs. There are pages of complaints about this in the forums. According to a message from an Oracle representative posted on page 8 of that thread, an Intel version will "hopefully" appear in Q1 CY2008.
  2. The libraries are built to assume they reside in the path /b/729/rdbms/lib. Since this is clearly not going to be the case for any reasonable installation of MacPorts, we need to use something like DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib/oracle when configuring php5, which can be done, but also when running php5, which is more cumbersome, especially if php is running say as an apache web server module. A more interesting idea will be to see if I can get install_name_tool to work to change this path to ${prefix}/lib/oracle within the dylibs themselves.
  3. I understand that we cannot build our own libraries for Intel (or any other architecture) because Oracle does not make the source code available.
  4. Downloading the libraries from the Oracle web site requires agreeing to a license agreement, so automated downloading through MacPorts may not work. If not, the user should visit the downloads page, get the "basic" and "sdk" downloads and place them in ${prefix}/var/macports/distfiles/oracle.

John found some advice for compiling php using the instantclient in the forums, some of which I am skeptical of however.

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

install_name_tool seems to be working great for fixing up those weird library paths. I added an oracle-instantclient port in r31834.

comment:3 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Added a +oracle variant to the php5 port in r31835. Please wait 12 hours, then "port selfupdate", then try installing it with "port install php5 +oracle". If you want to try it sooner, then wait 30 minutes, then selfupdate, then run "portindex" in your dports directory. Then try installing it.

The extent of my testing has been that the build completes properly and function_exists() reports that the oci_* functions now exist. I haven't actually tried to use any of them because I don't have an Oracle server to connect to.

comment:4 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

John has told me that this works so I'll close the ticket.

comment:5 Changed 16 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

Note: See TracTickets for help on using tickets.