New bie to PHP (Oracle 9i and PHP problem)

Alles, was PHP betrifft, kann hier besprochen werden.

New bie to PHP (Oracle 9i and PHP problem)

Postby blackeyed » 22. October 2007 09:04

Hi all, I m totally new to PHP and i have to connect to oracle via php. I have Apache server running on my machine and php installed. But I am not able to connect to oracle via a sample PHP code. Can you pls guide me through. My code looks something like this.

Code: Select all
If PHP is working, you will see "Hello World" below:
<?php $conn = oci_new_connect('testdb, 'testdb123', 'testdb');
$stid = oci_parse($conn, 'select sysdate from dual');
print '<table border="1">';
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS))
print '<tr>';
foreach ($row as $item)
print '<td>'.($item?htmlentities($item):' ').'</td>';
} print '</tr>'; }
print '</table>'; ?>

only this line appears : "If PHP is working, you will see "Hello World" below:"

The error log (which i just found :-P shows something like this)

[error] [client] PHP Fatal error: Call to undefined function oci_connect()

Any help pls ..
Posts: 1
Joined: 22. October 2007 08:59

Postby Wiedmann » 22. October 2007 14:08

Your PHP version? OS?

In the code you are using oci_new_connect(), and the error message is about oci_connect() ?
AF Moderator
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Return to PHP

Who is online

Users browsing this forum: No registered users and 19 guests