Oracle issues Call to undefined function oci_connect()

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Oracle issues Call to undefined function oci_connect()

Postby dkoch0452 » 02. June 2006 14:58

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.
dkoch0452
 
Posts: 4
Joined: 02. June 2006 14:44

Postby nickfan » 03. June 2006 18:27

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.
User avatar
nickfan
 
Posts: 3
Joined: 03. June 2006 17:54
Location: nanjing in china

oracle connection problems

Postby dkoch0452 » 05. June 2006 14:56

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.
dkoch0452
 
Posts: 4
Joined: 02. June 2006 14:44

oracle issues

Postby dkoch0452 » 05. June 2006 20:03

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.
dkoch0452
 
Posts: 4
Joined: 02. June 2006 14:44

Re: oracle connection problems

Postby nickfan » 06. June 2006 13:35

[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.
User avatar
nickfan
 
Posts: 3
Joined: 03. June 2006 17:54
Location: nanjing in china

Oracle issues Call to undefined function oci_connect()

Postby dkoch0452 » 06. June 2006 13:42

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.
dkoch0452
 
Posts: 4
Joined: 02. June 2006 14:44

Postby kmilo » 06. October 2006 18:58

What product worked correctly ?
kmilo
 
Posts: 3
Joined: 06. October 2006 17:30

Postby Alexander Franz » 13. October 2006 15:37

As I have the same issue I would also be interested in any hint.

Thanks!
Alexander Franz
 
Posts: 5
Joined: 13. October 2006 15:27

Postby emmbec » 15. December 2006 17:51

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???
emmbec
 
Posts: 2
Joined: 15. December 2006 17:13
Location: Mexico

Postby emmbec » 18. December 2006 16:39

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.
emmbec
 
Posts: 2
Joined: 15. December 2006 17:13
Location: Mexico

Re: Oracle issues Call to undefined function oci_connect()

Postby vicioso » 19. October 2009 07:08

You are a life saver. Eres un Genio.
It worked for me after editing php.ini in Apache/bin directory.

Gracias!!!!

Thank you.
vicioso
 
Posts: 1
Joined: 19. October 2009 07:05


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 120 guests