Issues connecting to my Oracle Database 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
ridlet3981
Forum Newbie
Posts: 2
Joined: Wed Oct 29, 2008 3:12 pm

Issues connecting to my Oracle Database with PHP

Post by ridlet3981 »

I'm trying to connect to my Oracle database with PHP and it's not working at all... I've researched the problem online and have tried all the suggestions I have found to no avail. This is the code I'm using...

Code: Select all

<?php
    $conn = oci_connect('username', 'password', '//localhost/XE') or die("Could not connect: " . oci_error());
?>
 
This is the error I'm getting...
Fatal error: Call to undefined function oci_connect() in C:\Web\MyPHP\phpOraclePractice.php on line 2

I've even tried modifying my php.ini file. I uncommented the extension = php_oci8.dll and changed the extension_dir = C:\PHP\ext, which is where the php_oci8.dll file is located. I'm lost and have no idea where to go from here...

Any help would be greatly appreciated!
Post Reply