我正在尝试安装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
,我已经检查了bin/php/php5.4.31/
中的php.ini
文件,并确保以下行未注释:
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
如果您是windows用户,请确保取消php.ini文件中的这一行注释:
extension_dir = "ext"
它确保PHP从自己的ext库中获取扩展。
@Javacadabra,像php_openssl.dll这样的扩展名将在php/ext/目录下,你可以在配置文件中修复这个路径,或者你可以将特定的文件从php/ext目录复制到php目录下。
在你的例子中,它将是c:'php'ext