Hi - connection problem to oracle with php

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
newwithphp
Forum Newbie
Posts: 2
Joined: Thu Aug 14, 2008 4:47 am

Hi - connection problem to oracle with php

Post by newwithphp »

I tried to follow this manual:
http://www.oracle.com/technology/pub/no ... stant.html

I change the PATH as it wrote there to the new directory that I created with the three dll's,
I also change the php.ini as it wrote.

I am trying to connect the oracle server by:

<?php
if ($c=OCILogon("scott", "tiger", "orcl")) {
echo "Successfully connected to Oracle.\n";
OCILogoff($c);
} else {
$err = OCIError();
echo "Oracle Connect Error " . $err[text];
}
?>

and I get: Fatal error: Call to undefined function OCILogon() in C:\wamp\www\index.php on line 5

what can be the problem?
I am using oracle 10g express and WampServer Version 2.0

If i didn't write any details that necessary please write me.
I am very new with PHP so I might didn't do some basic things...

Thanks a lot!
Dan
phpMonk
Forum Newbie
Posts: 5
Joined: Sun Aug 17, 2008 6:23 am

Re: Hi - connection problem to oracle with php

Post by phpMonk »

You need to have enabled the relevant Oracle libraries in PHP, I think they are php_oci8.dll & php_oracle.dll
Post Reply