PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_bz2.dll' - 找不到指定的模块问题解决

  • 2017-02-09
  • koko
  • php

在新电脑上安装了xampp环境,运行php命令时报错,具体错误信息如下:

	C:\Users\xxx>php -v
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_bz2.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_gd2.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_mbstring.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_exif.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_mysql.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_mysqli.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_pdo_mysql.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_pdo_odbc.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_pdo_sqlite.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_sockets.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_sqlite3.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_xmlrpc.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP Warning:  PHP Startup: Unable to load dynamic library '\xampp\php\ext\php_xsl.dll' - 找不到指定的模块。
	 in Unknown on line 0
	PHP 5.6.16 (cli) (built: Nov 25 2015 18:52:34)
	Copyright (c) 1997-2015 The PHP Group
	Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

检查指定目录下,有对应的dll文件。

网上有几种解决办法,修改php_mbstring.dll的位置,调整dll版本等,尝试均未能解决问题。

最终解决办法,dll的相对路径改成绝对路径。

在php.ini中, extension_dir ="\xampp\php\ext" 修改为绝对路径,比如 extension_dir ="e:\xampp\php\ext"

评论

    Error (#32) - KOKO.VC

    Error (#32)

    An internal server error occurred.

    The above error occurred while the Web server was processing your request.

    Please contact us if you think this is a server error. Thank you.