Connect With 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
my_raj_raj2
Forum Commoner
Posts: 28
Joined: Mon Mar 20, 2006 8:06 am
Location: India

Connect With Oracle

Post by my_raj_raj2 »

Anybody know how to connect PHP with Oracle?

When i connect to oracle using oci_connect
Fatal error: Call to undefined function oci_connect() in C:\Program Files\xampp\htdocs\oracle\db1.php on line 16
How to solve this?

Thx in advance.
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Re: Connect With Oracle

Post by miro_igov »

php.net wrote:CVII. Oracle Functions
Introduction

These functions allow you to access Oracle 10, Oracle 9, Oracle 8 and Oracle 7 databases using the Oracle Call Interface (OCI). They support binding of PHP variables to Oracle placeholders, have full LOB, FILE and ROWID support, and allow you to use user-supplied define variables.
Requirements

You will need the Oracle client libraries to use this extension. Windows users will need libraries with version at least 10 to use the php_oci8.dll.
my_raj_raj2
Forum Commoner
Posts: 28
Joined: Mon Mar 20, 2006 8:06 am
Location: India

Connect With Oracle

Post by my_raj_raj2 »

So i will download oracle 10 library files for connect?
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

Download, save in php extensions dir, enable them in php.ini, restart the server.
my_raj_raj2
Forum Commoner
Posts: 28
Joined: Mon Mar 20, 2006 8:06 am
Location: India

Connect With Oracle

Post by my_raj_raj2 »

Thx for ur reply.

I download the files and save this file

Then i uncomment the

extension=php_oci8.dll

But same error occurs.

This is problem in XAMPP?
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

Restarted the server?

make a file with <?php phpinfo(); ?> inside, open it and make sure you are editing the right php.ini file and your OCI extension is loaded.
my_raj_raj2
Forum Commoner
Posts: 28
Joined: Mon Mar 20, 2006 8:06 am
Location: India

Post by my_raj_raj2 »

After the changes in php.ini. I restart my sysytem.

But it shows an error
Warning: php_oci8.dll not found
But this file found in the php/ext folder.

And I check my phpinfo page this is not show OCI extension.

advice me

How to set this dll varibles?
Post Reply