• windows7 安装 composer


    之前在mac linux win10 安装运行未发现这样的奇奇怪怪的问题,随手记录下。


    设置好php命令path 

     2个位置 administrator告知php安装版本执行文件exe目录,系统告知php.exe。(同一个版本的设置)



    F:ddexecomposer>php -r "readfile('https://getcomposer.org/installer');" | php

    PHP Warning: readfile(): Unable to find the wrapper "https" - did you forget to
    enable it when you configured PHP? in Command line code on line 1
    PHP Warning: readfile(https://getcomposer.org/installer): failed to open stream
    : Invalid argument in Command line code on line 1

    Warning: readfile(): Unable to find the wrapper "https" - did you forget to enab
    le it when you configured PHP? in Command line code on line 1

    Warning: readfile(https://getcomposer.org/installer): failed to open stream: Inv
    alid argument in Command line code on line 1

     设置php.ini 打开ssl设置 ;extension=php_openssl.dll

    F:ddexecomposer>php -r "copy('https://install.phpcomposer.com/installer', 'co
    mposer-setup.php');"
    PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify faile
    d in Command line code on line 1

    Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify faile
    d in Command line code on line 1
    PHP Warning: copy(): Failed to enable crypto in Command line code on line 1

    Warning: copy(): Failed to enable crypto in Command line code on line 1
    PHP Warning: copy(https://install.phpcomposer.com/installer): failed to open st
    ream: operation failed in Command line code on line 1

    Warning: copy(https://install.phpcomposer.com/installer): failed to open stream:
    operation failed in Command line code on line 1

    需要证书 

    简答方法

    浏览器直接地址访问下载

    https://getcomposer.org/installer

    下载后拉倒php.exe同目录下使用cmd命令

    php installer 

    php -r "unlink('installer');"

    或者是下载更新包 

    https://install.phpcomposer.com/composer.phar 

    下载后php.exe同目录下使用cmd命令 

    php composer-setup.php 

    php -r "unlink('composer-setup.php');"

    或者对着composer文件进行 

    @php "%~dp0composer.phar" %*

    如果找不到位置就使用 

    @php "F:ddexephpStudyphp70ncomposer.phar"

    成功后写入bat 

    新建 composer.bat 文件  内容写入“@php "%~dp0composer.phar" %*” 保存,用管理员身份运行该文件。

    或者cmd执行

    echo @php "%~dp0composer.phar" %*>composer.bat

    最后 检测是否安装成功

    composer -V

    -------------------------------------(写代码不孤独_小小代)
  • 相关阅读:
    LODOP、C-LODOP注册号的区别
    Lodop强制分页LODOP.NewPage()和LODOP.NewPageA()
    c-lodop云打印实现手机打印 JS语句打印
    如何取消浏览器护眼色 Lodop打印图片有窗口颜色的边框
    PS中如何提高修改psd图片的效率(自动选择工具)
    Lodop如何打印直线
    Lodop打印控件 如何打印虚线
    Lodop窗口的按钮、权限,隐藏或设置功能不可用
    ArrayList与LinkedList区别
    URLDecoder与URLEncoder
  • 原文地址:https://www.cnblogs.com/xiaoxiaodai/p/13685824.html
Copyright © 2020-2023  润新知