php安装及配置笔记

  1. windows下启动php-cgi方式为:php-cgi.exe -b 127.0.0.1:9000 -c php.ini(也可以是绝对路径)。
  2. 安装XDebug支持,最基本的配置参数为:

    [xdebug]

    zend_extension=”(PHP路径)extphp_xdebug-2.2.5-5.6-vc11-x86_64.dll”

    xdebug.remote_enable = On

    xdebug.remote_handler = dbgp   

    xdebug.remote_host= localhost

    xdebug.remote_port = 9000

    xdebug.idekey = PHPSTORM

  3. 如果在PhpStorm中配置XDebug支持,请在Setting中吧php->server和run/debug configurations中添加web application即可。
  4. 如果是在windows下php和nginx搭配,那么先启动php,然后启动nginx,然后配置Php文件用php引擎解释即可,nginx基本配置如下:

    location ~ .php$ {
    root (web路径);
    fastcgi_pass 127.0.0.1:9001;\这个ip和端口要与php-cgi.exe -b 127.0.0.1:9001启动一致。
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }

  5. php手动启动命令为:(绝对路径)php-cgi.exe -b 127.0.0.1:9001 -c (绝对路径)php.ini
原文地址:https://www.cnblogs.com/meizhouxiang/p/4623206.html