#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    257
    Rep Power
    11

    Php-oci8.dll won't load on php 5.0.5 & apache2 on XP


    Hello everybody,

    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
  2. #2
  3. The Queen of Typos
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Sep 2004
    Location
    San Clemente
    Posts
    1,471
    Rep Power
    191
    Originally Posted by tobycatlin
    Hello everybody,

    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
    Can you post portions of your php.ini that have the oracle rlated stuff as well as your paths to the dll?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    257
    Rep Power
    11
    sure,
    from php.ini:

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

    ;Windows Extensions
    ;Note that ODBC support is built in, so no dll is needed for it.
    ;
    ;extension=php_adt.dll
    ;extension=php_apd.dll
    ;extension=php_bitset.dll
    ;extension=php_blenc.dll
    ;extension=php_bz2_filter.dll
    ;extension=php_classkit.dll
    ;extension=php_cpdf.dll
    ;extension=php_crack.dll
    ;extension=php_curl.dll
    ;extension=php_cvsclient.dll
    ;extension=php_db.dll
    ;extension=php_dba.dll
    extension=php_dbase.dll
    extension=php_dbx.dll
    extension=php_dio.dll
    ;extension=php_domxml.dll
    ;extension=php_event.dll
    ;extension=php_fdf.dll
    ;extension=php_ffi.dll
    extension=php_filepro.dll
    ;extension=php_fribidi.dll
    extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_gopher.dll
    ;extension=php_http.dll
    ;extension=php_hyperwave.dll
    ;extension=php_ibm_db2.dll
    ;extension=php_id3.dll
    ;extension=php_ifx.dll
    ;extension=php_iisfunc.dll
    ;extension=php_imagick.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_ixsfunc.dll
    ;extension=php_ldap.dll
    ;extension=php_lzf.dll
    ;extension=php_mailparse.dll
    ;extension=php_maxdb.dll
    extension=php_mbstring.dll
    extension=php_exif.dll
    ;extension=php_mcrypt.dll
    ;extension=php_mcrypt_filter.dll
    ;extension=php_memcache.dll
    ;extension=php_mhash.dll
    extension=php_mime_magic.dll
    extension=php_ming.dll
    extension=php_msql.dll
    extension=php_mssql.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    ;extension=php_netools.dll
    ;extension=php_ntuser.dll
    ;extension=php_oracle.dll
    extension=php_oci8.dll
    ;extension=php_oggvorbis.dll
    extension=php_openssl.dll
    ;extension=php_parsekit.dll
    extension=php_pdf.dll
    ;extension=php_pdo.dll
    ;extension=php_pdo_mssql.dll
    ;extension=php_pdo_mysql.dll
    ;extension=php_pdo_oci.dll
    ;extension=php_pdo_odbc.dll
    ;extension=php_pdo_pgsql.dll
    ;extension=php_pdo_sqlite.dll
    ;extension=php_pgsql.dll
    ;extension=php_phpdoc.dll
    ;extension=php_pop3.dll
    ;extension=php_printer.dll
    ;extension=php_pspell.dll
    ;extension=php_radius.dll
    ;extension=php_runkit.dll
    extension=php_shmop.dll
    ;extension=php_smtp.dll
    ;extension=php_snmp.dll
    extension=php_soap.dll
    extension=php_sockets.dll
    ;extension=php_ssh2.dll
    ;extension=php_stats.dll
    ;extension=php_sybase_ct.dll
    ;extension=php_threads.dll
    ;extension=php_tidy.dll
    ;extension=php_translit.dll
    ;extension=php_win32ps.dll
    ;extension=php_win32scheduler.dll
    ;extension=php_win32service.dll
    ;extension=php_win32std.dll
    ;extension=php_xdebug.dll
    ;extension=php_xmlreader.dll
    ;extension=php_xmlrpc.dll
    ;extension=php_xmlwriter.dll
    ;extension=php_xsl.dll
    ;extension=php_yaz.dll
    extension=php_zip.dll
    ;extension=php_zlib_filter.dll

    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
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    257
    Rep Power
    11
    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?
  8. #5
  9. Sleepwalker
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Location
    The Tangent Universe
    Posts
    386
    Rep Power
    57
    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:
    \PHP\dlls\libeay32.dll
    \PHP\dlls\ssleay32.dll
    \PHP\dlls\iconv.dll
    This solved the problem.
    28 DAYS : 6 HOURS : 42 MINUTES : 12 SECONDS
    "Why are you wearing that stupid man suit?"
  10. #6
  11. The Queen of Typos
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Sep 2004
    Location
    San Clemente
    Posts
    1,471
    Rep Power
    191
    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.
  12. #7
  13. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2005
    Location
    Ghana
    Posts
    193
    Rep Power
    9
    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.
  14. #8
  15. The Queen of Typos
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Sep 2004
    Location
    San Clemente
    Posts
    1,471
    Rep Power
    191
    Originally Posted by eyedol
    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.
    I think you're right!
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    257
    Rep Power
    11
    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.
  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2007
    Posts
    1
    Rep Power
    0
    Originally Posted by tobycatlin
    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.
    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.

    Damn, how did you get it?

IMN logo majestic logo threadwatch logo seochat tools logo