Re: Oracle8, PHP4 and Apache
| From: | Radu Filip | Date: | Thu, 10 Aug 2000 11:03:26 +0000 |
| Subject: | Re: Oracle8, PHP4 and Apache | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11110@lists.php.net to get a copy of this message | ||
On Tue, 8 Aug 2000 thies@digicol.de wrote:
> please relink your apache adding -lpthread to the LDFLAGS.
>
> the problem here is that a executable thats *not* linked
> agains -lpthread cannot load a shared library that is liked
> against -lpthread. (libphp4.so - linked against -lclntsh
> linked against -lpthread).
>
> this is a glibc-2.1 bug that supposed to be finxed in 2.2 (i
> heard).
Thanks for all peoples that helped me with this problem. I recompiled
Apache (with suggested option) and php4 and it worked.
Still, a small problem exists: if a restart my Linux box, a simple php
script that perform a simple query fail, but if a restart Apache, it's ok:
The script is (test.php):
<?php
$conn=OCILogon("xxdb","xxdb");
$stmt=OCIParse($conn,"select name from countries");
OCIDefineByName($stmt,"NUME",&$name);
OCIExecute($stmt);
while(OCIFetch($stmt)){
echo "nume :" . $name."\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
After I start machine and both oracle and Apache server are up and
running, if I try to execute this script I receive the following error:
[root@pandora radu]# lynx www/~lili/test.php
Warning: _oci_open_server: Error while trying to retrieve text for error ORA-12545 in
/local/home/lili/public_html/test.php on line 2
Warning: Supplied argument is not a valid OCI8-Connection resource in
/local/home/lili/public_html/test.php on line 3
Warning: Supplied argument is not a valid OCI8-Statement resource in
/local/home/lili/public_html/test.php on line 4
Warning: Supplied argument is not a valid OCI8-Statement resource in
/local/home/lili/public_html/test.php on line 5
Warning: Supplied argument is not a valid OCI8-Statement resource in
/local/home/lili/public_html/test.php on line 6
Warning: Supplied argument is not a valid OCI8-Statement resource in
/local/home/lili/public_html/test.php on line 9
[root@pandora rc.d]# /etc/rc.d/init.d/httpd restart
Shutting down http:
/local/server/web/bin/apachectl stop: httpd stopped
Starting httpd: /local/server/web/bin/apachectl start: httpd started
[root@pandora radu]# lynx www/~lili/test.php
nume :Romania
Why? Anyway, Apache started after oracle. I tried also with a delay
(seeep 20) but it won't worked. I also tried to restart Apache
automatically (in rc.local) but it also won't worked.
Thx in advance,
Socrate