February 13th, 2006, 12:46 PM
Php-oci8.dll won't load on php 5.0.5 & apache2 on XP
After posting in a thread that was 5 years old one of the mods suggested i create a new thread.
I am trying to get my local development server connected to our main Oracle database. Now i have read in place that it as simple as uncommenting the correct extension in php.ini, but it isn't working out so simple.
I have windows xp pro sp2, running a xampp (http://www.apachefriends.org/index-en.html) install consisting of Apache/2.0.55 and PHP/5.0.5.
I have downloaded the instant client libraries from oracle and installed them (10g version 10.2.0.1 for 32 bit windows), making sure their location is in the path and that the tns_admin var points to tnsnames.ora.
I downloaded a fresh copy of php_oci8.dll (version 5.0.5) from http://pecl4win.php.net/ext.php/php_oci8.dll and i still get the same message:
'PHP Startup: unable to load dynamic library c:\program files\xampp\php\ext the specified module cannot be found'
This message popsup twice, when ever apache loads.
The file is deffo in that folder along with all the other dll files that load ok. The only thing that i can think of is that the php_oci8.dll cannot linkup to the oracle client libraries. as i said before the client libraries are in the path and i have tried putting the client libraries in the wondows folder. no joy
I also tried installing php 5.1.1 and that got the same error.]
I have seen loads of forum posts similar to this but i have tried everything anyone has suggested in order to get this working, any help would be wonderful
thanks in advance
February 13th, 2006, 02:03 PM
Can you post portions of your php.ini that have the oracle rlated stuff as well as your paths to the dll?
Originally Posted by tobycatlin
February 14th, 2006, 05:04 AM
; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\Program Files\xampp\php\ext\"
;Note that ODBC support is built in, so no dll is needed for it.
note this is version 5.0.5 of the dll and 5.0.5 of php
the environmetal path variable has the path to the oracle instant client library 10g
February 15th, 2006, 05:07 AM
have also tried this with php 4.3 and got exactly the same result. surely i must be missing something obvious. Can anyone else running php with oracle lend a hand?
February 15th, 2006, 06:55 AM
I seem to remember having a similar problem, but I'm not sure the problem was the Oracle extension. In the end I just put all the DLLs in the system32 directory, including:
This solved the problem.
28 DAYS : 6 HOURS : 42 MINUTES : 12 SECONDS
"Why are you wearing that stupid man suit?"
February 15th, 2006, 07:45 AM
I ran oracle with php 5 at my old work, just can't remember the exact php.ini config. Do you have other extensions inside that folder C:\Program Files\xampp\php\ext\ that are working correctly? My only thing I can think of is that you have the path wrong...
Did you try uncommenting this too? extension=php_oracle.dll
One more thing to try is to take the default php.ini that comes with the binary and put the oracle extensions in the default extension folder.
I'll email one of my old coworkers today and see if I can get him to send me the php.ini.
February 15th, 2006, 08:53 AM
Copy the dll file php_oci8.dll to your WINDOWS directory since you are running windows xp. then uncomment this ( extension=php_oci8.dll )if it is listed if not add it to list of exentions. Then save the php.ini file then restart your apache and i tell you it will work.
February 15th, 2006, 09:25 AM
I think you're right!
Originally Posted by eyedol
February 15th, 2006, 12:07 PM
I have found the source of all my woes. Because it was a totally fresh install of windows, there is no msvcr71.dll in my system folder.
Either php_oci8.dll or the orcale client libs rely on it to operate. Once i stuck msvcr71.dll in my system32 folder all ran smooth as a nut. If only oracle had mentioned this in their setup guide. It also explains why so many people have trouble doing this on windows 2003 server.
Thanks a lot everyone for looking at my problem, i really appreciate it.
August 28th, 2007, 04:08 AM
Ahh... Thank you. Thank you so much I was already going crazy with "check your php.ini file" note. I copied this dll and it works.
Originally Posted by tobycatlin
Damn, how did you get it?