win下的zend studio调试linux下的程序

一. 安装linux ZendDebugger

到http://www.zend.com/en/products/studio/downloads

下载Studio Web Debugger

然压后选择合适版本的ZendDebugger.so

复制到/usr/lib/php/modules/目录

复制dummy.php到站点根目录

vi /etc/php.ini

加入以下内容

[Zend Debugger]
zend_extension="/usr/lib/php/modules/ZendDebugger.so"
zend_debugger.allow_hosts=127.0.0.1/32,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
zend_debugger.expose_remotely=1
zend_debugger.passive_mode_timeout=180

 

重启服务器就行了

各配置选项的含义参见:http://files.zend.com/help/Zend-Server-5-Community-Edition/zenddebugger.html


二.验证安装成功及设置调试

sh# php -v (有可能是与zend_optimizer冲突)

Zend Studio配置:
工具->首选项->调试 调试方式选服务器,debugger server url为网站的浏览地址,dummy.php就是放在这个目录下
重启IDE,进行调试

 

zend studio 7.0以上的版本操作:

1 ) .  先为studio添加新的服务器源,则你的linux web server地址

  如:你的linux nginx/apache配置的域名为test.zend.com 即设置Default PHP Web Server或者新添的server2的URL为

            http://test.zend.com

      另: 你的dummy.php也即放在此目录下,则:http://test.zend.com/dummy.php

 

英文help:

To add a new server to the list or edit an existing server configuration:

  1. Click New
    -Or- select an existing server and click Edit.

  1. Enter the name of your server.

  2. Enter the URL that points to its document root.

  3. Click  Next.
    The Server Path Mapping dialog appears.

  1. If you would like to map a path on your server to a local path, click Add and enter:

  2. The path on your server.

  3. The path you would like to map it to in your Workspace or on your File System.
    See Adding a Server Location Path Map for more information.

  1. If you would like to enable integration with Zend Server, mark the 'Enable Zend Server  Integration' checkbox and enter the relevant information:

  2. URL Suffix - The suffix which should be added to the URL of your document root in order to browse to your Zend Server GUI.

  3. Port number - Enter the port number you defined during Zend Server installation.
    See the Zend Server FAQ site for default port number settings.

  4. Password - The password used to access your Zend Server GUI.

  1. If you would like to enable integration with Zend Platform, mark the 'Enable Platform Integration' checkbox and enter the relevant information:

  • Platform GUI

  • Authentication - Your Platform User Name and Password

  1. For more, see Defining a Platform Server.

  1. Click Finish.

2) .  安装zend debugger

       The Installed Debuggers Preferences page is accessed from Window | Preferences | PHP | Debug | Installed Debuggers.

 

      DEBUG->installed Debugger-> Zend Debugger settings->Client Host/IP

     其他的配置选项默认。

 

3). 测试

To debug a PHP Web Page

      run -> debug config -> 新建一个测试 -> "Test Debugger"

      查看是否正确,根据提示找原因修正错误!!

 

注意点、重点:

 在安装完linux下的Zend Debugger,配置完后进入测试。发现怎么测怎么有错,也不能正常进行调试。后来找了一天的帮助文档,经过努力终于解决了问题:

  1. 先查找你的linux web server 中的php扩展是否有 xcache.so,通过phpinfo()查看。

       我这里会有Additional .ini : /etc/php5/cgi/conf.d/xcache.ini

  2.  如果不需要请去掉扩展xcache的配置文件xcache.ini, 重启php

  3.  再度Test Debugge -》 OK

   虽然会出现另一个出错提示,但是不会影响调试功能。

 

见: http://echodittolabs.org/blog/2010/08/how-configure-eclipse-pdt-zend-server-debugger-mamp-drupal

 

注:

zend studio中的help

 

To set up communication between Zend Studio and the server on which you are debugging:

  1. Ensure the Zend Debugger is installed on your server.
    The Zend Debugger comes bundled with Zend Server , Zend Core and Zend Platform , but can also be downloaded as a separate component from http://www.zend.com/en/products/studio/downloads .

  2. Ensure the machine on which your Zend Studio is installed is an allowed host for your debugger.
    The method for configuring this setting will depend on whether you have Zend Server, Zend Platform, Zend Core, or the standalone Zend Debugger installed on your system.
    See Setting your Zend Studio to be an Allowed Host for more information.

  3. In Zend Studio, configure your server according to the instructions under Adding Servers in the PHP Servers Preferences .

  4. Ensure the correct settings are configured in your Debug Preferences and Installed Debuggers Preferences pages.

  5. Ensure you have a dummy.php file in your remote server's document root.

  6. If your server is situated behind a firewall or other security device, see Setting Up Tunneling for information on how to enable a communication tunnel.
    If you don't know whether your server is situated behind a firewall, contact your System Administrator.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值