unable to load dynamic library php_oci8.dll

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
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

unable to load dynamic library php_oci8.dll

Post by yacahuma »

I sure this have to be one of the most common errors. I look in the web an there are thousands of post

I have instant client on C:\oracleclient\instantclient_10_2

I added the to PATH
I added
ORACLE_HOME=C:\oracleclient\instantclient_10_2
NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
TND_ADMIN=C:\oracleclient\instantclient_10_2

I am running on windows XP, apache2 and php 5.2.3
php_oci8.dll is the only extension in php.ini

BUT when I run php -v on the command line i get
C:\Documents and Settings\oky>php -v

Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\php_oci8.dll' -
The specified procedure could not be found.
in Unknown on line 0
PHP 5.2.3 (cli) (built: May 31 2007 09:37:22)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
And yes, the file is in that directory.

WHAT THE HECK IS WRONG? What I am missing? Obviously I am not the only one. I know if I install zend core my problem will go away. But I should be able to do this.

Thank for for your help.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I can't reproduce your problem.

- download php-5.2.3-Win32 (zip package), extracted it
- renamed php.ini-dist to php.ini
- and editted php.ini:
- removed the ; before the extension=php_oci.dll (line 617)
- changed the extension_dir to "./ext" (line 476)

(Btw, at first i did run into a problem, because i mistakenly uncommented php_pdo_oci.dll ;))
(Oh, and i have an entry to %oracle client%\bin in my PATH environment variable)
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

there is no

Post by yacahuma »

there is no php_oci.dll on php.ini, just php_oci8.dll

and the instant client dont have a bin directory.


I just downloaded from oracle . It only has 8 files.
classes12.jar,oci.dll,ocijdbc10.dll.ociw32.dll,ojdbc14.jar,orannzsbb10.dll,oraocci10.dll, oraociei10.dll
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Have you met all of the requirements on this page?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Re: there is no

Post by timvw »

yacahuma wrote:there is no php_oci.dll on php.ini, just php_oci8.dll
You're right about this one.
yacahuma wrote: and the instant client dont have a bin directory.

I just downloaded from oracle . It only has 8 files.
classes12.jar,oci.dll,ocijdbc10.dll.ociw32.dll,ojdbc14.jar,orannzsbb10.dll,oraocci10.dll, oraociei10.dll
I can confirm that last time i tried iwas not able to get my .net driver working with only the "oracle instant client" installed...On the machine i just tested it i have a complete 10g intallation, where it obviously does work...
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

AHHHHHHHHHHHHHHHHHHHH

Post by yacahuma »

i remove oracle_xe , c:\orant directory
i also remove the whole oracle dev suite


I remove every oracle instant in the registry


restarted the machine


So basically the only oracle libraries left in my machine are from the instant client

I also install and remove oracle zend core(had the same error)

Now I get one more error


This application has failed to start because ORA805.dll was not found. Then I get the oci8 error.


Why php_oci8.dll is looking for that library? I actually saw it in the orant\bin directory(which I deleted)


But again the instant client or php_oci8 should not be lookgin for that. Is not suppose to be in my machine anyway.

AHHHHHHHHHHHHHHHHHHHHHHHHHHH

8 hours and counting.......
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

news from the battefield

Post by yacahuma »

I got home and install php5 , and the instant client on an xp home edition, it worked.

So now the question is, WHAT IS ON MY MACHINE(XP PROF) that is causing this strange error.

I deleted everything from the registry and everything from the hard drive.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

No idea. I suggest you remove the instant client and php and then reinstall them both.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

windows melt down

Post by yacahuma »

Well, After everything else failed( more than 12 hours). I believe I am suffering from a windows meltdown.
apache in not running, mysql is not running, oracle xe is not running.

I used to backup my windows machine once a year. I have been running with this instance for about 3.

Is there are any doubt that linux is superior ...

I started moving all my files to another machine(windows xp home). With windows the machine took forever to start the copy.

I just rebooted my machine in ubuntu and started the process. I have 4 copies going at the same time with about 30,000 files on each and the machine just keep working. I was never able to do that on windows. There is no io lag while using the machine.

BTW In ubuntu, following this howto http://www.howforge.com/how-install-oci8-php-5-ubuntu

it took me less than 5 minutes to get php and oci working. I hate windows.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Frickin' heck yeah. That is a sweet little post. Go linux!
Post Reply