Apache&PHP+Xdebug 安裝配置

WBOY
發布: 2016-08-08 09:22:11
原創
894 人瀏覽過

最近又要開始用 PHP 做開發,每次都要查一遍怎麼安裝配置環境,各個地方寫的還不一樣很煩。自己寫。

Apache

  1. 進入官網,打開Download頁,下載最新版的壓縮包;
  2. 解壓到自己想安裝的目錄下,我這裡是放到了F:Program FilesApache F:Program FilesApacheconf 目錄,編輯器開啟
  3. httpd.conf
  4. 檔案。修改以下部分: line 37: ServerRoot "c:/Apache24" -> ServerRoot "F:/Program Files/Apache" line 58: Listen 80 -> Listen 8080
    line 218: ServerName www.example.com:80 -> ServerName www.example.com:8080 line 242: DocumentRoot "c:/Apache24/htdocs" -> DocumentRoot "F:/Projects/php" <br> line 243: <directory> -> <directory> <br> line 276: DirectoryIndex index.html -> DirectoryIndex index.php index.htm index.html <br> line 359: ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/" -> ScriptAlias /cgi-bin/ "F:/Program Files/Apache/cgi-bin" <br> line 375: <directory> -> <directory files> <br><br><br><br>加上對PHP的支持,在文件末尾加上下面的內容: <br></directory></directory></directory></directory>
  5. # php5 support
  6. LoadModule php5_module "F:/Program Files/php/php5apache2_4.dll"
    PHPIniDir "F:Program Filesphp" AddType application/x-httpd-php .php .html .htm <br> # configure thepath to php.ini <br><br><br> 如此,Apache 就設定完成。 <br><br>PHP
進入官網,在

Download

找到下載鏈接,下載壓縮包;
  1. 解壓到自己想安裝的目錄下,我這裡是放到了F:Program Filesphp 進入中, F:Program Filesphp 目錄,將
  2. php.ini-development
  3. 重新命名為php.ini,並用編輯器開啟這個檔案。修改以下部分:
  4. line 736: extension_dir = "ext" -> extension_dir = "F:/Program Files/php/ext" line 807: upload_tmp_dir = -> upload_tmp_dir = "/upload-files" line 881: ;extension=php_curl.dll -> extension=php_curl.dll line 883: ;extension=php_gd2.dll -> extension=php_gd2.dll line 890: ;extension=php_mbstring.dll -> extension=php_mbstring.dll line 892: ;extension=php_mysql.dll -> extension=php_mysql.dll
    line 895: ;extension=php_openssl.dll -> extension=php_openssl.dll line 897: ;extension=php_pdo_mysql.dll -> extension=php_pdo_mysql.dll <br> line 899: ;extension=php_pdo_odbc.dll -> extension=php_pdo_odbc.dll <br> line 915: ;extension=php_xmlrpc.dll -> extension=php_xmlrpc.dll <br> line 930: ;date.timezone = -> date.timezone = Asia/Chongqing <br> line 1417: ;session.save_path = "/tmp" -> session.save_path = "/session" <br><br><br> 並在<br>line 892<br> 後面加入:<br>extension=php_mysqli.dll<br><br><br>進入xdebug官網,開啟Download頁
    ,下載對應系統和PHP版本的dll檔案; Program Filesphpext 中;繼續編輯php.ini
  5. ,在文件末尾添加如下內容:
  6. [XDebug]
  7. zend_extension = "F:Program Filesphpextphp_xdebug-2.3.3-5.6-vc11-x86_64.dll"
  8. xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 0
  9. xdebug.profiler_output_dir = "F:Program Filesphpxdebug"
  10. xdebug.profiler_output_name = "cachegrind.out.%t-%s" xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp"
    xdebug.remote_host = "127.0.0.1" xdebug.trace_output_dir = "F:Program Filesphpxdebug" <br><br><br><br>在firefox安裝easiest Xdebug插件;<br><br>啟動phpstorm的電話筒監聽;完成。 MySQL太簡單,就不寫了。 <br><br> <br> 以上就介紹了Apache&PHP+Xdebug 安裝配置,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。 <br> <br> <br>
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!