Re: oracle vs php4
| From: | Sergio | Date: | Wed, 22 Nov 2000 08:46:31 +0000 |
| Subject: | Re: oracle vs php4 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4646@lists.php.net to get a copy of this message | ||
Feher Sandor wrote:
> Hi folks!
>
> I've tried to fire up my php 4.0.3pl1 engine with Oracle 8.1.6. I've
> installed necessary libs and headers of the Oracle 8.1.6 and compiled it
> with following options:
>
> "./configure" \
> "--with-pgsql" \
> "--with-apxs" \
> "--with-gd" \
> "--with-oci8=/myoraclehome" \
> "$@"
>
> After the successfully compilation I'v tried to start up the apache.
> However everything has looked fine the apache child processes have been
> segfaulted. I've set all the environment variables
> (ORACLE_HOME,LD_LIBRARY_PATH etc.). If I compile it without oracle
> support it works fine. The Oracle server is not on the same machine
> where the apache server is.
>
> apache-1.3.12-2
> 2.2.17-RAID
> Red Hat 6.2
>
> ps: please feel free to cc the answer to my private address too 8-)).
>
> TIA and bye, Sanya
>
> --
> ...Feher Sandor... mailto:fehers@freemail.hu
> http://w3.swi.hu/sfeher
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
Hello. I have had the same problem. The problem is what follows:
If you execute:
# ldd /opt/oracle/OraHome1/lib/libclntsh.so.8.0
(... other...)
libpthread.so.0 => /lib/libpthread.so.0 (0x40597000)
(.... other...)
You see libclntsh.so.8.0 is compiled whit pthread support.
If you execute:
# ldd /home/apache/libexec/libphp4.so
(... other...)
libclntsh.so.8.0 => /opt/oracle/OraHome1/lib/libclntsh.so.8.0
(0x4013e000)
(...other...)
libpthread.so.0 => /lib/libpthread.so.0 (0x40803000)
(... other...)
But if you execute...
# ldd /home/apache/bin/httpd
(... other...)
libpthread.so.0 => /lib/libpthread.so.0 (0x40019000)
(...other...)
Surely, you can't see last line.That's the problem. You have to re-compile
apache with pthread support:
LDFLAGS=-lpthread ./configure (in apache compile configuration
time).
This error comes from a bug in libc 2.1. In libc 2.2 this bug will be fixed
(I have heard).
The problem is that, if your program uses a library that uses libpthread,
you must have
support for libpthreads in your program . Look at the problem graph:
httpd (without pthread) ==> libphp4.so (with pthread) ==>
libcltnsh.so.8.0 (with pthread) ==> libpthread
So, httpd should have pthread compiled in.
Sergio