php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4165 Need "-R$ORACLE_HOME/lib" when linking libphp4.so ?
Submitted: 2000-04-17 18:26 UTC Modified: 2000-06-15 07:59 UTC
From: cgibbons at nyx dot net Assigned:
Status: Closed Package: Oracle related
PHP Version: 4.0 Release Candidate 1 OS: Solaris 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cgibbons at nyx dot net
New email:
PHP Version: OS:

 

 [2000-04-17 18:26 UTC] cgibbons at nyx dot net
Here's the error:

  $ sudo /etc/init.d/apachectl start
  Syntax error on line 208 of /usr/local/etc/httpd/conf/httpd.conf:
  Cannot load /usr/local/etc/httpd/libexec/libphp4.so into server: ld.so.1: /usr/local/etc/httpd/bin/httpd: fatal: libclntsh.so.1.0: open failed: No such file or directory
  /etc/init.d/apachectl start: httpd could not be started

Line 208 of httpd.conf is:
  LoadModule php4_module        libexec/libphp4.so

The libclntsh.so.1.0 file is in $ORACLE_HOME/lib.  This leads me to believe that $ORACLE_HOME/lib need's to be added to libphp4.so's library search path at link time, using the linker's "-R" flag -- perhaps a makefile or a configure script needs tweaking?

For a temporary fix, I've added code to /etc/init.d/apachectl to set up an LD_LIBRARY_PATH with $ORACLE_HOME/lib before the server is started, but of course messing with LD_LIBRARY_PATH is never the ideal solution...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-17 18:58 UTC] cgibbons at nyx dot net
> Here's the error:

>   $ sudo /etc/init.d/apachectl start
>   Syntax error on line 208 of /usr/local/etc/httpd/conf/httpd.conf:
>   Cannot load /usr/local/etc/httpd/libexec/libphp4.so into server: ld.so.1:
>   /usr/local/etc/httpd/bin/httpd: fatal: \
>   libclntsh.so.1.0: open failed: No such file or directory
>   /etc/init.d/apachectl start: httpd could not be started

> Line 208 of httpd.conf is:
>   LoadModule php4_module        libexec/libphp4.so

> The libclntsh.so.1.0 file is in $ORACLE_HOME/lib.  This
> leads me to believe that $ORACLE_HOME/lib needs to
> be added to libphp4.so's library search path at link time,
> using the linker's "-R" flag -- perhaps a makefile or a
> configure script needs tweaking?

> For a temporary fix, I've added code to /etc/init.d/apachectl
> to set up an LD_LIBRARY_PATH with $ORACLE_HOME/lib
> before the server is started, but of course messing with
> LD_LIBRARY_PATH is never the ideal solution...

Oh yeah, I forgot, here was the configure line, as reported by phpinfo():

Configure command:
  './configure'
  '--prefix=/usr/local/php'
  '--with-config-file-path=/usr/local/etc/httpd/conf'
  '--with-apxs=/usr/local/etc/httpd/bin/apxs'
  '--with-oracle=/u01/app/oracle/product/8.0.4'

(Since the user that executed ./configure doesn't have the
ORACLE_HOME environment variable set, it had to be explicity
specified in the --with-oracle option.  Perhaps this linker problem
goes away if the "--with-oracle" pathname is taken from the
environment instead of from the ./configure command line?
I don't know...)
 [2000-06-15 07:59 UTC] rasmus at cvs dot php dot net
Set your ORACLE_HOME variable before running PHP's ./configure
and then just use --with-oci8
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 12:01:32 2025 UTC