problem with adodb, php5, linux and oracle.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rosty
Forum Newbie
Posts: 1
Joined: Fri Sep 07, 2007 4:26 am

problem with adodb, php5, linux and oracle.

Post 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.
mezise
Forum Newbie
Posts: 17
Joined: Tue Sep 18, 2007 4:38 am

Post 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
Post Reply