Page 1 of 1

Oracle issues Call to undefined function oci_connect()

PostPosted: 02. June 2006 14:58
by dkoch0452
Apache will not load the php_oci8.dll. It says it can't find it. Of course it is exactly where it is suppose to be. The Oracle Client is installed, just not sure the settings are correct or what they are supposed to be.

PostPosted: 03. June 2006 18:27
by nickfan
i add the extension path (eg: D:\xampp\php\ext) to my server 'PATH' environment variables
(set PATH=D:\xampp\php\ext;%windir%\system32;...)
and restart your server,then try again.

oracle connection problems

PostPosted: 05. June 2006 14:56
by dkoch0452
When you say "add the extension path (eg: D:\xampp\php\ext) to my server 'PATH' environment variables
(set PATH=D:\xampp\php\ext;%windir%\system32;...)
and restart your server,then try again." do you mean in php.ini? Where exactly? My IT help does not know this and i am on my own.

oracle issues

PostPosted: 05. June 2006 20:03
by dkoch0452
I found this is really just a bug in XAMP. Using a different distribution of Apache and PHP there is NO problem. After the Oracle Network 8 client is installed, you only should have to uncomment the one line from PHP for php_oci8.dll. That being said I had to try four different Apache/PHP/MySql installations before finding one that would work.

Re: oracle connection problems

PostPosted: 06. June 2006 13:35
by nickfan
[quote="dkoch0452"]When you say "add the extension path (eg: D:\xampp\php\ext) to my server 'PATH' environment variables
(set PATH=D:\xampp\php\ext;%windir%\system32;...)
and restart your server,then try again." do you mean in php.ini? Where exactly? My IT help does not know this and i am on my own.[/quote]

{
right click your "My Computer" icon on the desktop.
select [properties] to open the 'system properties' dialog box.
}
or
{
just press the [win]+[break] key to open the 'system properties' dialog box.
}
select the [Advenced] label
click [Environment Variables] button
find 'Path' Variable on the ('System Variables') List Box (if you are logon as administrator otherwise you should change the 'User Variables') and click Edit button below.
on the Edit dialog box add ';D:\xampp\php\ext' to the end of value (exclude the quote symbol);
click [ok] and [ok]
then reset your server.
after that the windows could find your dll files in the ext dir.

Oracle issues Call to undefined function oci_connect()

PostPosted: 06. June 2006 13:42
by dkoch0452
It was finding all the extensions correctly except php_oci8.dll and they are all in the same directory. It is XAMP itself. I tried four variations of WAMP installations from various vendors, all had the same issue in various degrees. Only one product worked correctly, I just had to uncomment the one line in php.ini. Nothing else is needed.

PostPosted: 06. October 2006 18:58
by kmilo
What product worked correctly ?

PostPosted: 13. October 2006 15:37
by Alexander Franz
As I have the same issue I would also be interested in any hint.

Thanks!

PostPosted: 15. December 2006 17:51
by emmbec
I have uncomment the OCI8 extension in PHP.INI:

Code: Select all
extension=php_oci8.dll


I have download the Instant Client Basic package for Windows from the Oracle site.

I have create a subdirectory (e.g., c:\instantclient10_2) and copy these libraries from the zip file:

* oraociei10.dll
* orannzsbb10.dll
* oci.dll

I have edited the environment and add c:\instantclient10_2 to PATH before any other Oracle directories.

This is a sample from my PHP.INI file for the extension path:

Code: Select all
; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\Program Files\xampp\php\ext\"


Which is the location where I installed XAMPP.

I have done all of that (which was in the oracle site http://www.oracle.com/technology/pub/notes/technote_php_instant.html and when I ran a script with PHPINFO() there is no OCI8 Section in that page...and if I try to use the OCILogon function I get a

Fatal error: Call to undefined function OCILogon() in C:\Program Files\xampp\htdocs\oracle_test.php on line 9


I have XAMPP version 1.5.5.
Windows 2000

Can anyone help me to sett up my connection to Oracle??? Or tell me what I'm doing wrong???

PostPosted: 18. December 2006 16:39
by emmbec
emmbec wrote:I have uncomment the OCI8 extension in PHP.INI:

Code: Select all
extension=php_oci8.dll


I have download the Instant Client Basic package for Windows from the Oracle site.

I have create a subdirectory (e.g., c:\instantclient10_2) and copy these libraries from the zip file:

* oraociei10.dll
* orannzsbb10.dll
* oci.dll

I have edited the environment and add c:\instantclient10_2 to PATH before any other Oracle directories.

This is a sample from my PHP.INI file for the extension path:

Code: Select all
; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\Program Files\xampp\php\ext"


Which is the location where I installed XAMPP.

I have done all of that (which was in the oracle site http://www.oracle.com/technology/pub/notes/technote_php_instant.html and when I ran a script with PHPINFO() there is no OCI8 Section in that page...and if I try to use the OCILogon function I get a

Fatal error: Call to undefined function OCILogon() in C:\Program Files\xampp\htdocs\oracle_test.php on line 9


I have XAMPP version 1.5.5.
Windows 2000

Can anyone help me to sett up my connection to Oracle??? Or tell me what I'm doing wrong???


I found what I was doing wrong, I was using a different PHP.INI, I was using the one on PHP/php.ini but XAMPP uses the following path for the php.ini:

C:\xampp\xampp\apache\bin

I edited the php.ini file in the correct folder and it worked ok.

Re: Oracle issues Call to undefined function oci_connect()

PostPosted: 19. October 2009 07:08
by vicioso
You are a life saver. Eres un Genio.
It worked for me after editing php.ini in Apache/bin directory.

Gracias!!!!

Thank you.