php 服務(wù)器調(diào)試 Zend Debugger 的安裝教程
遠(yuǎn)程調(diào)試需要服務(wù)器端的組件支持,我們今天的內(nèi)容就是怎么來安裝這個(gè)服務(wù)器端調(diào)試環(huán)境,用到的調(diào)試組件是Zend Debugger,它是輕便而且夠用的,在撰寫本文時(shí),其最新版本是5.2.14,與網(wǎng)絡(luò)上廣為流傳的5.2.10版略有更新。我的服務(wù)器是windows下的apache,因此我就下載了windows版的Zend Debugger,下來的壓縮包大約2.1M,有個(gè)readme.txt,我覺得有必要看哈子:
Zend Debugger installation instructions
—————————————
1. Locate ZendDebugger.so or ZendDebugger.dll file that is compiled for the correct version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x) in the appropriate directory.
2. Add the following line to the php.ini file:
Linux and Mac OS X: zend_extension=/full/path/to/ZendDebugger.so
Windows: zend_extension_ts=/full/path/to/ZendDebugger.dll
Windows non-tread safe: zend_extension=/full/path/to/ZendDebugger.dll
(*) the windows non-thread safe is used only with Zend Core 2.0
3. Add the following lines to the php.ini file:
zend_debugger.allow_hosts=<ip_addresses>
zend_debugger.expose_remotely=always
4. Place dummy.php file in the document root directory.
5. Restart web server.
這里已經(jīng)非常詳細(xì)的講了安裝方法了,那我就以我晦澀的語言再描述一遍吧
以下是壓縮包內(nèi)所有文件的列表:
ZendDebugger-5.2.14RC9-cygwin_nt-i386\md5
ZendDebugger-5.2.14RC9-cygwin_nt-i386\Inventory.xml
ZendDebugger-5.2.14RC9-cygwin_nt-i386\4_3_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386\4_3_x_comp\ZendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386\4_4_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386\4_4_x_comp\ZendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_0_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_0_x_comp\ZendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_1_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_1_x_comp\ZendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_2_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_2_x_comp\ZendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_2_x_nts_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386\5_2_x_nts_comp\ZendDebugger.dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386\dummy.php
ZendDebugger-5.2.14RC9-cygwin_nt-i386\README.txt
解壓出合適的也就是和你當(dāng)前php的版本對(duì)應(yīng)的Zend Debugger版本,我的php版本是5.2.5,因此我就把5_2_x_comp給拖出來了(至于5_2_x_nts_comp指的是non-tread safe,沒有明白具體用途,也就不妄用了),我將5_2_x_comp\ZendDebugger.dll移動(dòng)到D:\myserver\ZendDebugger\5_2_x\ZendDebugger.dll,將壓縮包中的dummy.php解壓到web根目錄,我這里的apache的DocumentRoot設(shè)置在D:/myserver,就拷貝dummy.php到D:\myserver\wwwroot,然后修改php.ini,加入了這些內(nèi)容:
zend_extension_ts=D:/myserver/ZendDebugger/5_2_x/ZendDebugger.dll
zend_debugger.allow_hosts=127.0.0.1/32,192.168.1.88/24
zend_debugger.expose_remotely=always
然后重啟apache,在略微的等待之后,我們輸入phpinfo()查看成功與否?
啊哈,運(yùn)行的很好的嘛~
下面打開ZDE,工具菜單->首選項(xiàng),選擇調(diào)試選項(xiàng)卡,設(shè)置調(diào)試方式為服務(wù)器,Debug Server URL填寫web服務(wù)器的URL,我這里apache的端口是8080,如果是默認(rèn)80端口,就可以省略了,OK,設(shè)置完成,確定之(如圖)
選擇 工具->檢查Debug Server連接,出來的對(duì)話框選擇是,我們看到了連接成功的提示
至此,我們的Debug Server就算成功安裝完成了,關(guān)于如何使用Zend Studio的服務(wù)器調(diào)試,后面的教程會(huì)詳細(xì)闡述,敬請(qǐng)期待哦。
- PHP 調(diào)試工具Debug Tools
- PHPStorm+XDebug進(jìn)行調(diào)試圖文教程
- 解析phpstorm + xdebug 遠(yuǎn)程斷點(diǎn)調(diào)試
- 調(diào)試PHP程序的多種方法介紹
- php 調(diào)試?yán)鱠ebug_print_backtrace()
- FirePHP 推薦一款PHP調(diào)試工具
- 在WAMP環(huán)境下搭建ZendDebugger php調(diào)試工具的方法
- PHP調(diào)試函數(shù)和日志記錄函數(shù)分享
- php Xdebug 調(diào)試擴(kuò)展的安裝與使用.
- PHP堆棧調(diào)試操作簡(jiǎn)單示例
相關(guān)文章
PHP下獲取上個(gè)月、下個(gè)月、本月的日期(strtotime,date)
因?yàn)楣ぷ餍枰枰@取上個(gè)月、下個(gè)月、本月的日期,特從網(wǎng)站找到了實(shí)現(xiàn)代碼,特分享下,方便需要的朋友2014-02-02PHP編程獲取圖片的主色調(diào)的方法【基于Imagick擴(kuò)展】
這篇文章主要介紹了PHP編程獲取圖片的主色調(diào)的方法,基于PHP的Imagick擴(kuò)展實(shí)現(xiàn)針對(duì)圖片的顏色值獲取功能,需要的朋友可以參考下2017-08-08PHP生成靜態(tài)HTML文檔實(shí)現(xiàn)代碼
這篇文章主要為大家詳細(xì)介紹了PHP生成靜態(tài)HTML文檔實(shí)現(xiàn)代碼,將數(shù)據(jù)庫中的文章數(shù)據(jù)生成單個(gè)的HTML文檔原理,感興趣的小伙伴們可以參考一下2016-06-06php中實(shí)現(xiàn)記住密碼自動(dòng)登錄的代碼
記得登錄QQ的時(shí)候,我們可以選記住密碼自動(dòng)登錄,這個(gè)功能確實(shí)很方便、實(shí)用。其實(shí)在我們登錄網(wǎng)站后臺(tái)的時(shí)候,瀏覽器就會(huì)有提示是否記住登錄狀態(tài)。2011-03-03