问题
Running Windows XP Professional SP 3
PHP Version 5.3.14
Zend Server Version 5.6.0
Apache/2.2.22 (Win32) mod_ssl/2.2.22
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\Zend\ZendServer\lib\phpext\php_ibm_db2.dll' - The specified procedure could not be found. in Unknown on line 0
Here is everything in my "Path" variable.
C:\app\adam\product\11.2.0\client_1
;C:\app\adam\product\11.2.0\client_1\bin
;%SystemRoot%\system32
;%SystemRoot%
;%SystemRoot%\System32\Wbem
;C:\PROGRA~1\IBM\CLIENT~1
;C:\PROGRA~1\IBM\CLIENT~1\Shared
;C:\PROGRA~1\IBM\CLIENT~1\Emulator
;C:\PHP
;C:/PHP
;C:\Program Files\Zend\ZendServer\bin
;C:\Program Files\Zend\ZendServer\share\ZendFramework\bin
;C:\PROGRA~1\IBM\SQLLIB\BIN
;C:\PROGRA~1\IBM\SQLLIB\FUNCTION
File properties:
C:\Program Files\Zend\ZendServer\lib\phpext\php_ibm_db2.dll
Size: 51.5 KB (52,736 bytes)
Created: Sunday, July 01, 2012, 12:18:48 PM
Modified: Tuesday, June 07, 2011, 3:43:00 PM
My PHP.ini file is in C:\PHP
extension_dir = "C:\PHP\ext"
extension=php_ibm_db2.dll
A search against my entire C:\ drive for php_ibm_db2.dll comes up with:
If there is any other detail i can provide please let me know. I'm baffled as to why it "cant find" this file.
Thanks for any help
-- Jul 30 Update --
Still dont have a solution, but I may have found an issue:
On the left of this page: http://windows.php.net/download/
"Which version do I choose? If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP"
Since we are using Apache2, according to the above statement, we need to use the VC6 version of PHP.
PHP 5.4 and PHP 5.3 are VC9. PHP 5.2 is the only VC6 listed. PHP 5.2 download "php-5.2.17-nts-Win32-VC6-x86.msi" did not include the php_ibm_db2.dll file.
I've tried using the .DLL file from 5.3 with PHP 5.2, but also get the same error message.
回答1:
Steps to make it work with PHP5.5/apache2.4.9/mysql5.5 on Windows:
All libraries must be consistent according to your OS, if you work with 32 bits download 32 bits libraries, the same with 64 bits, don't mix.
1) Install iSeries client libraries (https://www-01.ibm.com/marketing/iwm/iwm/web/preLogin.do?source=swg-idsdpds) you will need an IBM ID to download, if you dont have it just sign up.
2) Configure your WAMP server and create a phpinfo()
script to check the Compiler
and Thread Safe
fields.
3) Open your php.ini and add/modify:
extension_dir
= "C:\wamp\bin\php\php5.5.12\ext\"
extension
=php_ibm_db2.dll
4) Download the PECL for ibm_db2 (https://pecl.php.net/package/ibm_db2/1.9.7/windows) and check it out with the Compiler
and Thread Safe
of the step 2), in my case 5.5 Thread Safe (TS) x64
, when I downloaded the name of the file was php_ibm_db2-1.9.7-5.5-ts-vc11-x64
that indicates Compiler
VC11, TS
(Thread Safe), 64 bits 1.9.7 version.
5) Unzip the file and copy php_ibm_db2.dll
to your php extension_dir
, in my case "C:\wamp\bin\php\php5.5.12\ext\"
.
6) Restart Apache,
7) Run "<?php echo phpinfo()?>
", if you see the ibm_db2
section it works.
回答2:
You need install DB2 Runtime Client first!
来源:https://stackoverflow.com/questions/11693859/winxp-php-startup-unable-to-load-dynamic-library-php-ibm-db2-dll