安装Composer OpenSSL问题

时间:2014-08-11 10:08:20

标签: php laravel openssl composer-php

大家好我正在尝试安装composer但是当我去安装它时我收到了这个错误:

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

我目前有php 5.4.31我正在运行WAMP2.2我已检查php.ini中的bin/php/php5.4.31/文件,并确保取消注释以下行:< / p>

extension=php_openssl.dll

错误仍然有效,我不知道如何解决它。正如我想的那样,通过取消注释它将被启用。

当我在终端窗口php --ini中运行此命令时,我收到以下消息:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\php_openssl.dll' - The specified module could not be found

2 个答案:

答案 0 :(得分:9)

请务必取消推荐此行:

 extension_dir = "ext"

确保php从其自己的ext库中获取扩展名

答案 1 :(得分:8)

@Javacadabra,php_openssl.dll等扩展名将在php / ext /目录下,您可以在配置文件中修复此路径,也可以将该特定文件从php / ext目录复制到php目录。

在你的情况下它将是c:\ php \ ext