首页 > 解决方案 > 尝试在 Windows 7 机器上安装 Composer 时出现 PHP 设置错误

问题描述

我在下载“Composer-Setup.exe”时收到以下错误,双击该文件并运行 PHP 设置检查。

php.ini 文件中是否有几行需要修复?我正在尝试在我的命令提示符中运行与在我的 Xampp 服务器上安装 Laravel 相关的 composer 命令('C:/Xampp/htdocs')。

The PHP exe file you specified did not run correctly:
C:\Program Files (x86)\iis express\PHP\v7.0\php.exe

The php.ini used by your command-line PHP is: C:\Program Files (x86)\iis express\PHP\v7.0\php.ini

A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.

Program Output:
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\iis express\PHP\v7.0\ext\php_sqlsrv_72_ts.dll' - The specified module could not be found.
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\iis express\PHP\v7.0\ext\php_mysql.dll' - The specified module could not be found.
 in Unknown on line 0

标签: phplaravelcomposer-php

解决方案


我认为问题出在您的 php 版本上,尝试将您的 php 版本升级到 7++


推荐阅读