Re: PHP/Oracle/RedHat

From: Date: Tue, 23 May 2000 21:42:54 +0000
Subject: Re: PHP/Oracle/RedHat
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-70@lists.php.net to get a copy of this message
Matthew Green wrote: > > Hi, > I am trying to get PHP with Oracle support to work. I am running > > RedHat 6.1, Oracle 8.1.6 (Oracle 8i EE Release 2), Apache 1.3.12-2 (rpm) > and PHP-4.0RC2 built with the following options : > > ./configure --with-apxs --with-config-file-path=/etc/httpd > --enable-safe-mode --with-exec-dir=/usr/bin --with-system-regex > --disable-debug --with-zlib --with-gdbm --with-db2 --enable-debugger > --enable-magic-quotes --enable-track-vars --with-xml --with-ftp > --enable-sysvsem --enable-sysvshm --with-gnu-ld --with-oci8 > > The problem is as soon as I start the apache web server (httpd -X), I > get 'Segmentation fault'. I've had the same results with > '--with-oracle' option. Any help would be appreciated. > > -- > Matthew Green > mgreennj@email.com Yes. I had this problem too. The problem appears to stem from the dynamic linking step. I've had the exact same problem with the MySQL support if the shared object is used instead of the static archive. If you build Apache from source with the Oracle client library, libclntsh, as a linking dependency it works reliably. To do this you can prefix the Apache configure command with a LIBS variable. LIBS="-L$ORACLE_HOME/lib -lclntsh" ./configure ... I don't know how else to fix it. You can test to see if this problem is indeed solved by my solution by running your current apache like this. If it works then you are seeing the same problem as I did. LD_PRELOAD="$ORACLE_HOME/lib/libclntsh.so" httpd -X As a production solution LD_PRELOAD probably isn't good because this linker variable will then be exported into CGI children processes as well and will cause them to also map libclntsh into their address space. Maybe that isn't so bad, but I'm not sure. - Kent --- Remove the "SPAMGaurd" from my address to reply.

« previous php.db (#70) next »