Page 1 of 1

problem with adodb, php5, linux and oracle.

Posted: Fri Sep 07, 2007 4:38 am
by rosty
Helo;
please everybody, I have a problem when trying to connect to an Oracle database with php5 on linux using adodb.

1) first script

Code: Select all

include("adodb/adodb.inc.php");
$conn = NewADOConnection('oci8');
$connid=$conn->Connect($host,$user,$password,$tnsname);
2) second script

Code: Select all

include("adodb/adodb.inc.php");
$conn = NewADOConnection('oci8');
$connid=$conn->Connect($tnsname,$user,$password);
3) third script

Code: Select all

include("adodb/adodb.inc.php");
$cstr = "MYSERVICE=(DESCRIPTION =(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT = $port)))(CONNECT_DATA=(SERVICE_NAME = MYSERVICE)))";
$connid= $conn->Connect($cstr, $user, $password);
in each case, when i run the script with firefox, it try to download the page instead of display it; when i use internet explorer, it returns an error: "Impossible d'afficher la page".

I tried many other method, but i had the same result. I need your help please.

Posted: Tue Sep 18, 2007 6:26 am
by mezise
Hi,
check what kind of headers your web server sends with the web page. If you do not now how to check it try e.g. this tool http://www.webconfs.com/http-header-check.php or any other found in the Web.
Pay attention to Content-Type header ("text/html" is OK, "application/octet-stream" is not).

To be sure - do simple pages display correctly? E.g.:

Code: Select all

<?php
    echo('Display me!');
?>
Michal