windows下安裝php及籌建debug環境

來源:互聯網
上載者:User
windows下安裝php及搭建debug環境
安裝apache2.4
官方地址:http://httpd.apache.org/
如果選擇2.2官方會編譯好,選擇2.4,要從其他鏡像下載
Files for Microsoft Windows
然後選擇ApacheHaus
然後下載v11_x64版本

修改配置httpd.conf
1.修改ServerRoot到安裝目錄
2.修改DocumentRoot到htdocs

php5.6.14基礎安裝
官方地址:http://php.net/
到官方地址下載v11_x64_安全執行緒版本
1.php設定檔修改:將php.ini-development修為php.ini
2.apache設定檔修改httpd.conf:在apache的設定檔尾部,追加
# php5 support,其中路徑要用斜杠,LoadModule和PHPIniDir修改為自己對應的目錄
LoadModule php5_module C:/ide/php/php-5.6.14/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure the path to php.ini
PHPIniDir "C:/ide/php/php-5.6.14"

php的xdebug2.3.3安裝
官方地址:http://xdebug.org/
下載PHP 5.6 VC11 TS (64 bit) ,並拷貝php_xdebug-2.3.3-5.6-vc11-x86_64.dll到php安裝目錄的下面
修改php.ini檔案,末尾追加,其中注意zend_extension,zend_extension_ts,extension。只配置zend_extension即可,其他不生效。
zend_extension = C:/ide/php/php-5.6.14/ext/php_xdebug-2.3.3-5.6-vc11-x86_64.dll
;zend_extension_ts = C:/ide/php/php-5.6.14/ext/php_xdebug-2.3.3-5.6-vc11-x86_64.dll
;extension=php_xdebug-2.3.3-5.6-vc11-x86_64.dll
[Xdebug]
;開啟自動跟蹤
xdebug.auto_trace = On
;開啟異常跟蹤
xdebug.show_exception_trace = On
;開啟遠端偵錯自動啟動
xdebug.remote_autostart = On
;開啟遠端偵錯
xdebug.remote_enable = On
;收集變數
xdebug.collect_vars = On
;收集傳回值
xdebug.collect_return = On
;收集參數
xdebug.collect_params = On


eclipse的debug配置
1.配置eclipse,修改PHP Excutables,把php安裝目錄配置上
同時修改PHP Excutables的子目錄,Execution Environments,把5.6勾上
2.修改PHP/Debug/Debuggers的XDebug
3.修改PHP/Servers/Default PHP Web Server裡面的連接埠,和htdocs
4.修改PHP/Debug,吧剛才設定的Excutables和Debuggers設定上
其中有個概念很重要,遠端偵錯,伺服器是eclipse,apache會主動來串連eclipse指定的IP和連接埠。apache裡,預設遠程連接埠是9000,地址是localhost。


後語
添加模組,從php.ini第849行開始
其中ts表示安全執行緒,nts表示線程不安全。
移動要注意版本的匹配,否則調試不通。
後續會,把eclipse的配置貼出來
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.