note 77 deleted from ref.oracle by sander
| From: | sander@php.net | Date: | Sun, 07 Apr 2002 12:33:57 +0000 |
| Subject: | note 77 deleted from ref.oracle by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-28885@lists.php.net to get a copy of this message | ||
Suppose your ORACLE_HOME is /opt/oracle/oracle/8.0.3 and you build a version of PHP3 with Oracle
support on Solaris like this:<p>
<pre>
./configure --with-oracle \
--with-config-file-path=/opt/GNUphp3/lib \
--with-exec-dir=/opt/bin \
--enable-debug=yes \
--enable-safe-mode=no \
--enable-url-fopen-wrapper=yes \
--enable-track-vars=yes \
--prefix=/opt/GNUphp3
</pre>
then the resulting PHP binary will be dynamically linked against libclntsh.so in
/opt/oracle/oracle/lib. The build process as generated by configure will include this directory with
an -L option, but not with an -R option (run-time library search path). This means that the
resulting binary will not be able to find libclntsh.so by itself, but depends on an appropriate
LD_LIBRARY_PATH set within the web server CGI environment - which usually is not there.
To fix this, grab the Makefile generated by configure and duplicate the
-L/opt/oracle/oracle/8.0.3/lib option as an -R/opt/oracle/oracle/8.0.3/lib option (your -L and -R
strings will look slightly different depending on the values for your oracle version and
ORACLE_HOME).
The -R option will compile in the corrent search path for libclntsh and you won't have any
LD_LIBRARY_PATH pains any more.