使用pecl 下载扩展一直出现 443 网上查了很久都解决不到

phpinfo 已经开启 openssl
cacert.pem 证书在 https://curl.haxx.se/ca/cacer... 下载的
C:phpStudyPHPTutorialtoolspear>php -r "print_r(openssl_get_cert_locations());"
Array
(

[default_cert_file] => c:/usr/local/ssl/cert.pem
[default_cert_file_env] => SSL_CERT_FILE
[default_cert_dir] => c:/usr/local/ssl/certs
[default_cert_dir_env] => SSL_CERT_DIR
[default_private_dir] => c:/usr/local/ssl/private
[default_default_cert_area] => c:/usr/local/ssl
[ini_cafile] => C:\phpStudy\PHPTutorial\tools\capath\cacert.pem
[ini_capath] => C:\phpStudy\PHPTutorial\tools\capath

)

C:phpStudyPHPTutorialtoolspear>pecl install xdebug
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Could not download from "https://pecl.php.net/get/xdebug-2.8.0.tgz", cannot download "pecl/xdebug" (Connection to `ssl://pecl.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)
Error: cannot download "pecl/xdebug"
Download failed
install failed

C:phpStudyPHPTutorialtoolspear>pecl install swoole
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Could not download from "https://pecl.php.net/get/swoole-4.4.12.tgz", cannot download "pecl/swoole" (Connection to `ssl://pecl.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)
Error: cannot download "pecl/swoole"
Download failed
install failed

C:phpStudyPHPTutorialtoolspear>pear -V
PEAR Version: 1.10.9
PHP Version: 7.1.13
Zend Engine Version: 3.1.0
Running on: Windows NT MIMI-46E529R 10.0 build 18362 (Windows 10) i586

C:phpStudyPHPTutorialtoolspear>

阅读 7.1k
1 个回答

https://www.php.net/manual/zh...

When using "pecl install package", you might run into a memory limit problem. Solution is to use "pear install pecl/$extensionname" since it uses php.ini's memory limit.
使用“ pecl安装软件包”时,可能会遇到内存限制问题。
解决方案是使用“ pear install pecl / $ extensionname”,因为它使用了php.ini的内存限制。
See also:

找了我好几天 最终用php官方手册的 pear install pecl/swoole
另外Windows 下载: 目前 PHP 项目没有为 Windows 下 PECL 扩展编译二进制文件。要在 Windows 下编译 PHP,请阅读有关章节。
如果一定要通过window编译那就看看下面的文章
https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2#building_pecl_extensions
https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
image.png

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏