For developement reasons (oracle realted) I hadto abandone mod_php.tgz (php
4.0.5) package delivered with slackware 8.0 and use php 4.0.6 so I.m
currently working with:
php 4.0.6 and apache 1.3.20 ona a slackware 8.0 (with kernel 2.2.19).

At first I recompiled php 4.0.6 with exact same options of original package
( got oprions from phpinfo() ) and all went fine.
I then decided to try adding oracle database support.
I recompiled apache to be linked against libpthread (as told to do so from
erlier bug report related to oracle & sybase) with not little effort since
apache's configure does not ponder such action!:

root@extensa:~# ldd /usr/sbin/httpd => /lib/ (0x40020000) => /lib/ (0x40042000) => /lib/ (0x40070000) => /lib/ (0x400c3000) => /lib/ (0x400c7000) => /lib/ (0x400dd000)
        /lib/ => /lib/ (0x40000000)

Had some trouble with "--with-mm=/usr" option which is enabled per default
on mpd_php.tgz package for slackware
while trying to start apache got this error: "/usr/libexec/
undefined symbol: mm_create"
So I temporarely removed it to get oracle working.

This ti what I did:
export LD_LIBRARY_PATH=/ora/app/oracle/product/8.0.5/lib:/usr/lib:/lib
export LD_RUN_LIBRARY_PATH=/ora/app/oracle/product/8.0.5/lib:/usr/lib:/lib
make clean
rm config.cache
./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-mod_charset
--enable-force-cgi-redirect --enable-discard-path --with-con
fig-file-path=/etc/apache --enable-safe-mode --with-openssl --enable-bcmath
--enable-calendar --enable-ctype --with-gdbm 
--enable-ftp --enable-gd-imgstrttf --with-gd=/usr/src/gd-1.8.2
--with-jpeg-dir=/usr/src/gd-1.8.2 --with-png-dir --with-gmp --with-my
sql=/usr --with-xml=shared --with-readline=/usr --enable-trans-sid
--enable-sockets --with-regex=php --enable-sysvsem
 --enable-sysvshm --enable-yp --enable-memory-limit --with-tsrm-pthreads
--disable-debug --with-zlib=/usr --with-ora

this stage went successfully with no ATTENTION message & no errors produced
debug.log so I went ahead and compiled & installed:

/usr/sbin/apachectl stop
make install

root@extensa:~# ldd /usr/libexec/ => /lib/ => /usr/lib/ => /usr/lib/ => /lib/ =>
/opt/ora_syb/ora/app/oracle/product/8.0.5/lib/ => /lib/ => /lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /lib/ => /lib/ => /usr/lib/ => /usr/lib/ => /lib/ => /lib/ 
        /lib/ => /lib/ 

Apache restarted ok and php seamed to work ok but as I made a very simple
function to start testing if I could query an oracle instance I ran into

function oraconnect_test($a,$b) {
$conn = Ora_Logon("system@orcl","manager");
$string = Ora_Error ($conn);
print "$string";
ora_logoff ($conn);

Every time I run this function I get one more defunct httpd process a some
warning messages from php:

Warning: Oracle: Connection Failed: Error while trying to retrieve text for
ORA-12154 in /home/httpd/html/cpr/functions.php on line 223

Warning: Supplied argument is not a valid Oracle-Connection/Cursor resource
/home/httpd/html/cpr/functions.php on line 225

Warning: Supplied argument is not a valid Oracle-Connection resource in
/home/httpd/html/cpr/functions.php on line 228

According to oracle ORA-12154 means:
12154, 00000, "TNS:could not resolve service name"
// *Cause:  The service name specified is not defined correctly in the
// *Action:  Make the following checks and correct the error:
//           - Verify that a TNSNAMES.ORA file exists and is in the proper
//             place and accessible. See the operating system specific
//             for details on the required name and location.
//           - Check to see that the service name exists in one of the
//             TNSNAMES.ORA files and add it if necessary.
//           - Make sure there are no syntax errors anywhere in the file.
//             Particularly look for unmatched parentheses or stray
//             Any error in a TNSNAMES.ORA file makes it unusable. See
//             Chapter 4 in the SQL*Net V2 Administrator's Guide. If
//             possible, regenerate the configuration files using the Oracle
//             Network Manager.

but my tnsnames is ok:
oracle@extensa:~# tnsping orcl

TNS Ping Utility for Linux: Version - Production on 26-OCT-01

(c) Copyright 1997 Oracle Corporation.  All rights reserved.

Attempting to contact (ADDRESS=(PROTOCOL=TCP)(Host=linux)(Port=1521))
OK (60 msec)

Has anybody got any suggestions ?
                  Davide RAO
       Database Administrator Group
           Tel: +39125 508765

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to