Page 1 of 1

oci_connect

Posted: Fri Apr 30, 2010 9:24 am
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?

Re: oci_connect

Posted: Fri Apr 30, 2010 9:30 am
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?

Re: oci_connect

Posted: Fri Apr 30, 2010 9:35 am
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

Re: oci_connect

Posted: Fri Apr 30, 2010 9:41 am
by tdsrogers
Ive enabled the php_oci8.dll extension but it is not showing up in phpinfo(). Any more help (its driving me mad!)?

Re: oci_connect

Posted: Fri Apr 30, 2010 9:54 am
by mikosiko
did you stop/restart apache (assuming that you are using it) after you enabled the extension ?

Re: oci_connect

Posted: Fri Apr 30, 2010 9:57 am
by tdsrogers
Yeah I did, Im running Apache through Wamp Server. Everything I keep trying just doesnt seem to work.

Re: oci_connect

Posted: Fri Apr 30, 2010 10:11 am
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

Re: oci_connect

Posted: Fri Apr 30, 2010 10:50 am
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?