[UPHPU] Configuring PHP for Oracle

Peeler, Wade M. Wade.Peeler at ngc.com
Tue Jun 28 11:18:32 MDT 2005


Thanks for the reply.  It's a slightly older Red Hat.  I'll try out your
advice. 

-----Original Message-----
From: Steve Dibb [mailto:steve at wonkabar.org] 
Sent: Tuesday, June 28, 2005 11:07 AM
To: Peeler, Wade M.
Cc: uphpu at uphpu.org
Subject: Re: [UPHPU] Configuring PHP for Oracle

Peeler, Wade M. wrote:
> We've been trying to configure PHP to connect to an Oracle database on

> another server.  From what I understand, all that's needed is to 
> install Oracle client software on our webserver and rebuild php with 
> Oracle options so it can use Oracle library functions.
> 
> We've installed the Oracle client software, but we can't figure out 
> how to rebuild php.  We got instructions for building php from 
> php.net.  php came preinstalled in the distribution, but we can't find

> any of the files that the instructions ask us to modify, and the
"configure"
> command that the instructions tell us to use to rebuild php is not 
> recognized and we can't find it anywhere on our system.
> 
> Is there anybody out there that can hand-hold us through this?  We've 
> only got Linux newbies around here, no gurus.

This is a total shot in the dark, but might help.

If youre running a Linux box (or something simliar where you would build
the php binaries from source code), just download the version of php you
want to install from php.net.

Open up a console and see what your current configuration options are:

$ php -i | grep configure

Run that command in the directory of your unpacked php download file,
but append --with-oracle to it.  Here's an example:

sdibb at flynn php-5.0.4 $ php -i | grep configure Configure Command =>
'./configure' '--with-mssql' '--with-pgsql' 
'--with-unixODBC' '--with-gmp' '--enable-bcmath' '--with-bz2' 
'--with-apxs2=/usr/sbin/apxs2' '--enable-memory-limit' '--with-openssl' 
'--with-openssl-dir=/usr' '--with-zlib' '--with-imap' '--with-imap-ssl' 
'--with-pear=/usr/lib/php'

sdibb at flynn php-5.0.4 $ php -i | grep configure Configure Command =>
'./configure' '--with-mssql' '--with-pgsql' 
'--with-unixODBC' '--with-gmp' '--enable-bcmath' '--with-bz2' 
'--with-apxs2=/usr/sbin/apxs2' '--enable-memory-limit' '--with-openssl' 
'--with-openssl-dir=/usr' '--with-zlib' '--with-imap' '--with-imap-ssl' 
'--with-pear=/usr/lib/php' --with-oracle

then just standard make, make install.  and restart apache or it won't
take effect.

If youre just using php on Windows though (through apache or IIS), just
modify your php.ini to include the oracle extension.

Steve




More information about the UPHPU mailing list