Page 1 of 1

Problem with oci_connect()

PostPosted: 14. September 2012 21:26
by Naimathullah
I have installed XAMPP 1.8 on windows 7. I get this error: Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\tools\cOracle.php on line 33. Did a research online and tried everything for last 2 days and still doesn't work.

I did following things:
Uncommented extension=php_oci8_11g.dll in php.ini
Added C:\instantclient_11_1;
Checked extension folder has oci8.dll file

Please advise me what changes I have to do to make it work.

Re: Problem with oci_connect()

PostPosted: 17. September 2012 08:04
by Naimathullah
Can anyone help me to solve this problem.

Re: Problem with oci_connect()

PostPosted: 17. September 2012 17:51
by JonB
My understanding is that you need to use the Instant Client with PDO methods. The old methods are deprecated.

The proper extension is: php_pdo_oci.dll

Code: Select all
;extension=php_pdo_oci.dll


http://php.net/manual/en/ref.pdo-oci.php

I have no way to test this, as I don't 'do' Oracle.

Good Luck
8)

Re: Problem with oci_connect()

PostPosted: 18. September 2012 01:49
by Naimathullah
Tried but I didn't work.

Re: Problem with oci_connect()

PostPosted: 22. September 2012 08:48
by mpapec
Naimathullah wrote:I have installed XAMPP 1.8 on windows 7. I get this error: Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\tools\cOracle.php on line 33. Did a research online and tried everything for last 2 days and still doesn't work.

I did following things:
Uncommented extension=php_oci8_11g.dll in php.ini
Added C:\instantclient_11_1;
Checked extension folder has oci8.dll file

Please advise me what changes I have to do to make it work.


You need C:\instantclient_11_1 in your enviroment path (also check phpinfo() for "oci8" section)