[nycphp-talk] Using PHP on Linux with Oracle
zaunere at yahoo.com
Mon Mar 3 09:41:36 EST 2003
--- Peter Balogh <palexanderbalogh at yahoo.com> wrote:
> We've had good experiences with our LAMP server but recently ran into a
> snag involving Oracle. We downloaded and installed the 800-meg software
> bundle from Oracle, which is supposed to allow direct communication
> between a PHP script and an Oracle database. (The client libraries were
> not divisible from the entire bundle--hence the massive install.)
> We recompiled Apache and PHP using the recommended flags for Oracle
> installation. When we execute our Oracle-accessing PHP scripts using
> the PHP command line interpreter, they work fine. When we try to
> access those same scripts as web pages, they work not at all. Error
> messages say that "OCI functions are not found."
As mentioned by others, you may be getting your PHP versions crossed between
what you've compiled and what you're running as a CLI and Apache module.
> Our PHP/Apache/Linux installers came straight from the Red Hat 7.2
> package. Are we running afoul of version problems?
I would say most likely. For an environment like this, I'd recommend
scraping any installers and packages and compile straight from source, both
Apache and PHP. Not considering compatibility and versioning issues, as
you're seeing now, often times Oracle needs a couple tweaks in PHP to run
correctly (enable PHP's own SIGCHLD handler maybe needed, for example). So,
compile all from source so at least you can set your baseline of what
features are enabled, etc.
Also, be aware of the ORACLE_HOME and ORACLE_BASE environment variables.
These must be set correctly, both as a shell, and within Apache (I generally
set them in apachectl or envvars for Apache2).
> Is there some trick to installing the Oracle client software?
More information about the talk