Windows PHP整合開發調試環境籌建

來源:互聯網
上載者:User
Windows PHP整合開發調試環境搭建

PHP整合開發調試環境搭建:

環境的軟體組成為: Apache2.4, PHP5.3 NTS, ZendDebugger,mod_fcgid-2.3.7-win32,Eclipse PHP。JDK1.5,mysql55

?

mysql55由於筆者之前自己使用安裝版的已經安裝過了。就只說PHP如何配置Mysql。

?

Apache2.4: http://www.apachelounge.com/download/win32/binaries/httpd-2.4.4-win32.zip

mod_fcgid: http://www.apachelounge.com/download/win32/modules-2.4/mod_fcgid-2.3.7-win32.zip

PHP5.3 NTS; http://windows.php.net/downloads/releases/php-5.3.26-nts-Win32-VC9-x86.zip

Zend Debugger: http://downloads.zend.com/studio_debugger/2011_04_10/ZendDebugger-20110410-cygwin_nt-i386.zip

Eclipse PHP: http://archive.eclipse.org/technology/epp/downloads/release/helios/SR1/eclipse-php-helios-SR1-win32.zip

?

Eclipse PHP只能運行在JDK1.5的環境。目前最高支援到PHP5.3的代碼提示。

Zend Debugger也是最高支援PHP5.3的調試。

?

Eclipse PHP解壓後,配置JDK1.5的環境變數就可以用了。

除了JDK1.5都是免安裝的,可以自己也做一個整合套件就像XAMPP那樣解壓後就可以到處運行。

?

Apache的配置,設定檔conf/httpd.conf:

1,啟動Apache必須配置ServerRoot

ServerRoot "C:\Apache24" 這個目錄要指向你解壓apache的目錄

2,配置網站根目錄,並把ZendDebugger裡面的dummy.php複製到這裡:

DocumentRoot "C:\php"
C:\php">

?

3,Apache配置fastCgi:

a, 解壓mod_fcgid-2.3.7-win32.zip,複製mod_fcgid.so 到 Apache2.4的Modules目錄中。

b, 到Apache 設定檔httpd.conf中LoadModule下面添加以下代碼。另外C:/Apps/PHP5.3NTS為筆者解壓PHP的路徑。

?

LoadModule fcgid_module modules/mod_fcgid.so

??? FcgidInitialEnv PHPRC??????? "C:/Apps/PHP5.3NTS"
??? AddHandler fcgid-script .php????
??? FCGIWrapper "C:\Apps\PHP5.3NTS\php-cgi.exe" .php

在到DocumentRoot添加CGI的執行代碼,把FollowSymLinks換成藍色代碼:

DocumentRoot "C:\php"

??? #
??? # Possible values for the Options directive are "None", "All",
??? # or any combination of:
??? #?? Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
??? #
??? # Note that "MultiViews" must be named *explicitly* --- "Options All"
??? # doesn't give it to you.
??? #
??? # The Options directive is both complicated and important.? Please see
??? # http://httpd.apache.org/docs/2.4/mod/core.html#options
??? # for more information.
??? #
??? Options Indexes ExecCGI MultiViews

?

Apache配置完成,現在配置PHP。

1, 到PHP的解壓檔案夾裡,把php.ini-development修改成php.ini

2,開啟php.ini,找到extension_dir,去掉前面的分號,修改其值為:C:/Apps/PHP5.3NTS/ext

3,如果需要串連Mysql則去掉;extension=php_mysql.dll前面的分號。

4,到;report_zend_debug = 0下添加以下代碼來配置Zend_debugger:

zend_debugger.allow_hosts = 127.0.0.1 localhost
zend_debugger.expose_remotely = 2
zend_extension = "C:\ZendDebugger-20110410-cygwin_nt-i386\5_3_x_nts_comp\ZendDebugger.dll"

?

好的,現在PHP的整合開發調試安裝環境完成。你可以開始開發了。

?

?

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.