oci_connect

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
tdsrogers
Forum Newbie
Posts: 11
Joined: Sat Mar 06, 2010 12:44 pm

oci_connect

Post by tdsrogers »

Hi

I am attempting to connect to a remote Oracle database using PHP with Wamp Server and keep getting the same error message:

"Fatal error: Call to undefined function oci_connect()..."

Has anyone got any ideas?
User avatar
hypedupdawg
Forum Commoner
Posts: 74
Joined: Sat Apr 10, 2010 5:21 am

Re: oci_connect

Post by hypedupdawg »

Without looking at any of your files, I would be unsure, but "undefined function" sounds like you are simply not calling an actual function that exists. Are you

a) Sure you have the name right
b) Sure that it is defined as a function?
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: oci_connect

Post by mikosiko »

check that you have the php_oci8.dll extension declared in your php configuration... you can check it using phpinfo() if you want
tdsrogers
Forum Newbie
Posts: 11
Joined: Sat Mar 06, 2010 12:44 pm

Re: oci_connect

Post by tdsrogers »

Ive enabled the php_oci8.dll extension but it is not showing up in phpinfo(). Any more help (its driving me mad!)?
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: oci_connect

Post by mikosiko »

did you stop/restart apache (assuming that you are using it) after you enabled the extension ?
tdsrogers
Forum Newbie
Posts: 11
Joined: Sat Mar 06, 2010 12:44 pm

Re: oci_connect

Post by tdsrogers »

Yeah I did, Im running Apache through Wamp Server. Everything I keep trying just doesnt seem to work.
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: oci_connect

Post by mikosiko »

if it is not showing in phpinfo then something is going bad with the setup....

check if you have the extension_dir directive properly configured and also check the parameters setup in the [OCI8] section of your php.ini

if the extension is present in the path defined in "extension_dir" and the parameters are correctly configured is not reason for it to do not work... with the only probably exception of a bad php_oci8.dll

Miko
tdsrogers
Forum Newbie
Posts: 11
Joined: Sat Mar 06, 2010 12:44 pm

Re: oci_connect

Post by tdsrogers »

Thanks for your help but I still cant seem to get it working. Ive attempted all that you have said. Are there any links to tutorials that you could recommend?
Post Reply