[nycphp-talk] Php 5.2.4 and Oracle instantclient
Hans Zaunere
lists at zaunere.com
Sat Sep 8 16:16:21 EDT 2007
Hi Joshua,
Joshua Hart wrote on Saturday, September 08, 2007 12:22 AM:
> Hi All!
>
> Does anybody have some hints as to what might be causing a problem
> (segfault) with Oracle's instantclient when used in conjunction with
> PHP 5.2.4 (both the CLI and a webserver -- apache 2.x).
>
> If I run simple queries I get a result -- no problem. (select * from
> atable where name='hart') However if I do any more complicated query
> (select from two tables via a join for example) I get a segmentation
> fault (again both with the CLI and it segfaults the httpd process).
>
> All programs are built from source (except instantclient which I
> downloaded from oracle). I'm running on SLES10 on an ia64 platform.
>
> The info PHP identifies as the system:
>
> Linux ssaturn 2.6.16.21-0.8-default #1 SMP Mon Jul 3 18:25:39 UTC
> 2006 ia64
And uname -a should report the same. Does what it report make sense?
> Oracle is instantclient ia64-10.2.0.3-20061230
>
> oci8 version 1.2.3 revision 1.269.2.16.2.37
>
> Here's my configure command for PHP:
>
> './configure' '--with-zlib' '--with-gd' '--with-jpeg' '--with-png'
> '--with-libxml2=/usr/bin' '--with-mysql=/usr/local/mysql5120'
> '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-ftp'
> '--with-imap-ssl=/usr/include/ssl'
> '--with-imap=/space/custom_builds/imap-stuff/' '--with-openssl'
> '--with-pam' '--with-dom' '--with-iconv' '--with-mbstring=all'
> '--with-mbregex' '--with-domsxlt' '--with-mcrypt' '--with-xml'
> '--with-mime-magic' '--enable-exif' '--enable-uploadprogress'
> '--with-xmlrpc' '--with-gettext' '--with-pgsql'
> '--with-oci8=instantclient,/usr/local/oracle'
Hmm... since this is ia64, there is no lib64 anywhere right? Make sure PHP
is linking against the right libs. Sometimes lib64'ness isn't always
obvious. Try adding --with-libdir=lib64 to the PHP ./configure, but I'm not
sure on this.
Another option would be to strip down the ./configure and add --disable-all.
Perhaps there are some conflicts with Oracle, lib64, etc. Then start to add
extensions to see if you can isolate the problem.
> Again, I can successfully login to the oracle database, and the
> simplest of queries works. Anything "complicated" crashes the program.
If I understand correctly - if you login via the Oracle client directly (so
no PHP involved), it'll still segfault when there's a complicated query?
> I saw on php.net messages about memory exhaustion and segfaults..
> Since I'm using the most recent version of PHP I would not think that
> getting a updated PECL package is going to do the trick. I increased
> the amt of memory a script can use (in php.ini) to 128Mb but no
> difference. Is there somehwere else I should be changing a setting?
Things should typically work right out of the box. If there is a new
package available, though, it might make sense to try it - but have some bug
fixes.
H
More information about the talk
mailing list