Oracle connection troubles

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I try to connect to an oracle DB though oci8 :
print "start<br>";
$conn = oci_connect($user,$base_Pass,$base);
if (!$conn) {
    $oerr = OCIError($conn);
        echo "Fetch Code 1:".$oerr["message"];
       print KO;
} else {
    print "OK";    
}When I run that, I don't even have an error message
All I have is start.
Why oci_connect doesn't print any log message if it does not work ?

My config : Linux 2.4.21-27.0.1
Oracle 9.20
PHP 4.3.2

Thanks for your ideas


Re: Oracle connection troubles

DEN wrote:

Quoted text here. Click to load it

Check your log files. Script is not completing so your install must be
configured to suppress errors to the browser.


Re: Oracle connection troubles

On Thu, 08 Dec 2005 10:30:39 +0100, DEN wrote:

Quoted text here. Click to load it

What does Apache log say? You should see  something like this:
$ sudo tail /opt/apache/logs/error_log
[Fri Dec 09 16:38:03 2005] [notice] Apache/2.0.54 (Unix) PHP/5.1.1 configured -- resuming normal operations
[Mon Dec 12 08:43:15 2005] [error] [client] PHP Warning:  ocilogon() [<a href='function.ocilogon'>function.ocilogon</a>]: _oci_open_server: ORA-12541: TNS:no listener\n in /usr/local/PHP/adodb/drivers/ on line 228, referer: http://localhost/dba/dba_helper.php

My database isn't started, that is why there is no listener. I have
completely proprietary, bleeding edge installation. You should look into
your Apache root to see where the error_log file is. It's usually very
informative. BTW, if you are beginning with Oracle and PHP, I can really
recommend PHP5 because of the exceptions. They make life so much easier...


Site Timeline