PHP扩展崩溃在Windows 7 64位的Apache HTTP服务器

  • Apache 2.2.15(32位)
  • PHP 5.3.2 VC6线程安全(32位)
  • Windows 7旗舰版(64位)
  • 英特尔酷睿2双核T7200 2 GHz

Apache Service Monitor可以识别PHP,但是如果在PHP.ini中启用了任何扩展,则会崩溃。 如果我全部禁用它们,如下所示,那么它工作。

;[PHP_BZ2] ;extension=php_bz2.dll ;[PHP_CURL] ;extension=php_curl.dll ;[PHP_GD2] ;extension=php_gd2.dll ;[PHP_GETTEXT] ;extension=php_gettext.dll ;[PHP_IMAP] ;extension=php_imap.dll ;[PHP_MBSTRING] ;extension=php_mbstring.dll ;[PHP_MYSQL] ;extension=php_mysql.dll ;[PHP_MYSQLI] ;extension=php_mysqli.dll ;[PHP_OPENSSL] ;extension=php_openssl.dll ;[PHP_PDO_MYSQL] ;extension=php_pdo_mysql.dll ;[PHP_PDO_ODBC] ;extension=php_pdo_odbc.dll ;[PHP_PDO_SQLITE] ;extension=php_pdo_sqlite.dll ;[PHP_PGSQL] ;extension=php_pgsql.dll ;[PHP_SOAP] ;extension=php_soap.dll ;[PHP_SOCKETS] ;extension=php_sockets.dll ;[PHP_SQLITE3] ;extension=php_sqlite3.dll ;[PHP_TIDY] ;extension=php_tidy.dll ;[PHP_XMLRPC] ;extension=php_xmlrpc.dll ;[PHP_XSL] ;extension=php_xsl.dll ;[PHP_EXIF] ;extension=php_exif.dll 

更新:按照Ignacio的build议在httpd上运行Dependency Walker,并返回:

 IESHIMS.DLL Error opening file. The system cannot find the file specified (2). 

与这在日志中:

 Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Error: Modules with different CPU types were found. Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. 

对于模块(以mod_alias为例):

 LIBAPR-1.DLL Error opening file. The system cannot find the file specified (2). LIBAPRUTIL-1.DLL Error opening file. The system cannot find the file specified (2). LIBHTTPD.DLL Error opening file. The system cannot find the file specified (2). 

日志:

 Error: At least one required implicit or forwarded dependency was not found. Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Error: Modules with different CPU types were found. 

与httpd一起使用PHP时崩溃的典型原因是库不匹配。 使用httpd上的Dependency Walker以及扩展来查找库冲突。

Renistalling Apache和PHP以某种方式解决了这个问题。