Hey guys, really new to php but trying to stumble my way through installation and configuration.

The Software: php4, oracle 9i (client), linux redhat 7.2, Apache

What works:
php
sqlplus connection to remote server
apache
linux

I tried to ./configure --with oci8=/home/oracle/OracleHome
when I try to get php to connect to my remote database
I get:
Fatal error: Call to undefined function: ocilogon() in /var/www/html/test.php on line 11

I really beleive that I am overlooking something simple, so simple I can't see it.

    try running php a th command line or using phpinfo function and see if the module is correctly enabled

    if that does work try a little bit more by reading
    [man]extension_loaded[/man]

      now i beleive it's a configure problem.

      ./configure --with-oracle=home/oracle/oracle_home --with-oci8=/home/oracle/oracle_home

      When I bring up the info page (phpinfo()) I get
      './configure' '--with-mysql' '--with-apxs'
      I removed config.cache before reconfiguring but still a no-go.
      I seem so close to having this work, but I can't quite see what I am doing wrong. going through the other blurbs it seems to be a correctable problem (usually with the installer😉 ). If anyone has worked through this I would really like to know how you did it!

        Make sure you know what your oracle home directory is. On Linux you can test for it using
        set | grep ORACLE.

        As long as that's set correctly, there's no need to specify --with-oci8=<some directory> since the default will be ORACLE_HOME. Notice I'm not using --with-oracle but rather --with-oci8. Don't use both at the same time. The "--with-oracle" directive is for Oracle7, not 8 or 9 which people generally have.

        My PHP 4.2.3 that worked configure script is ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-so --without-mysql -with-oci8

        Finally, make sure to set the ORACLE environment variables in our apachectl file, which starts up httpd:

        export ORACLE_HOME=/opt/oracle/product/9.0.1
        export LD_LIBRARY_PATH=$ORACLE_HOME/lib

        Please replace the ORACLE_HOME with what your ORACLE_HOME actually is.

        And finally, On LInux I place the ORACLE library directory in /etc/ld.so.conf as
        /opt/oracle/product/9.0.1/lib
        and run ldconfig

          It seems that the Make Install failed due to oci8.h not being loaded on the Oracle install. Found a friend that is more php savy than I to help me. When we get this resolved I'll post the results here for anyone else who has this problem. Hopefully by Tuesday morning I will have some good news for all. I also feel better knowing that I followed all the instruction in the manual, but it makes fell bad that I didn't recognize the ERROR code after the Make. Will keep everyone posted and thanks to all who have contributed!

          DTI

            That's exactly the problem I had as well, "Oci.h" was missing. So I when back into the Oracle installer and did a custom client install, making sure to inclue the "Oracle Call Interface". Problem solved.

              Write a Reply...