|
Posted by Mladen Gogala on 10/22/35 11:34
On Thu, 08 Dec 2005 10:30:39 +0100, DEN wrote:
> Hello,
> 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
> OCI 8
> PHP 4.3.2
>
> Thanks for your ideas
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 127.0.0.1] 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/adodb-oci8.inc.php 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...
--
http://www.mgogala.com
Navigation:
[Reply to this message]
|