`
pcajax
  • 浏览: 2106942 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

vs.php中使用apache或IIS7进行外部调试

阅读更多

vs.php中使用apache或IIS7进行外部调试

1、解决vs.php2.7在Windows7下调试apache出错的问题
vs.php默认使用内部调试模式,由于vs.php2.7默认自带的内部调试的apache和php版本比较低,
在Windows7中运行的时候会产生不兼容的情况,具体表现为apache出错退出,解决办法:
改变安装目录中的apache.exe在兼容模式下运行
我这边是C:\Program Files\Jcx.Software\VS.Php\2008\2.7\Apache2\bin\apache.exe,兼容模式
选择是Windows2003

2、vs.php使用IIS7进行外部调试
很遗憾,我测试了很多次都没有成功,截止到Xdebug 2.1.0beta2对IIS7支持不好,不管是采用ISAPI还是FASTCGI模式,
都没办法进行断点调试。
附网上的方法,其实这种方法是没办法进行断点调试的,只是看上去很美好罢了:
右击项目,选择“属性”,在“属性”页里选中Debug,更改里面的Debug mode为“External mode”。
设置Debug engine为“XDebug”。最后再把Start Url改为IIS下设置的PHP项目首页文件,
如:“http://localhost:8080/vsphp/index.php”。(注:我在 IIS7下专门为PHP新建了一个端口为8080的网站)

3、vs.php中使用外部的apache进行调试
一般phper们都会有自己配置好的开发调试环境,那么如何在vs.php中使用自己已经配置好的apache+php环境调试
php程序呢?如下:
(1)从官方网站http://xdebug.org/download.php下载最新的xdebug.dll(记得改成这个文件名)放到你的php目录的ext目录下
根据你的php的thread-safe模式,选择相应的版本,查看方法phpinfo()的Thread Safety的值,
我用的php是5.2.12,Thread Safety为enable,所以我下载的是 5.2 VC6 (32 bit)
(2)修改php.ini文件,加入下面的代码
zend_extension_ts=”D:\Server\server_core\php-apache\ext\php_xdebug.dll”

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[XDebug]
xdebug.idekey = vsphp
xdebug.remote_enable = 1
xdebug.remote_port = 7870
xdebug.remote_autostart = 1

(3)在vs里右击项目,选择“属性”,在“属性”页里选中Debug,更改里面的Debug mode为“External mode”。
设置Debug engine为“XDebug”。最后再把Start Url改为你已经配置好的apache+php环境的项目首页网址
(4)重启apache服务器

4、注意!xdebug和zendoptimizer不兼容,所以在开启xdebug调试的时候请务必在php.ini里关闭zendoptimizer,如下前面加上分号即可
[Zend]
;zend_extension_manager.optimizer_ts=”D:\Server\server_core\zendoptimizer\lib\Optimizer-3.3.0″
;zend_extension_ts=”D:\Server\server_core\zendoptimizer\lib\ZendExtensionManager.dll”
如果xdebug生效的话,你可以在phpinfo()里看到
with Xdebug v2.1.0beta2-dev, Copyright (c) 2002-2010, by Derick Rethans
等字样。

分享到:
评论

相关推荐

    org.apache.commons.lang jar包下载(commons-lang3-3.1.jar)

    META-INF/MANIFEST.MFMETA-INF/LICENSE.txtMETA-INF/NOTICE.txtorg.apache.commons.lang.ArrayUtils.class org.apache.commons.lang.BitField.class org.apache.commons.lang.BooleanUtils.class org.apache....

    org.apache.commons.lang jar包下载

    META-INF/MANIFEST.MFMETA-INF/LICENSE.txtMETA-INF/NOTICE.txtorg.apache.commons.lang.ArrayUtils.class org.apache.commons.lang.BitField.class org.apache.commons.lang.BooleanUtils.class org.apache....

    Apache PHP 调试环境

    不需要安装的 只需要解压到一个非中文路径的文件夹即可. Apache\\bin\\Apache.exe 调试时运行 该文件即可. 如果要升级 PHP 可以去 www.php.net 官方下载 zip 版编译包. 把 目录下的 dll lib 及 ext ...

    WIN7中APACHE和IIS7.5相互转换

    WIN7中APACHE和IIS7.5相互转换

    org.apache.http包

    import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.HttpVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; ...

    org.apache.poi jar包

    org.apache.poi JAR包,解决个人的 import org.apache.commons.beanutils.PropertyUtilsBean; import org.apache.commons.lang.StringUtils; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi...

    org.apache.http 相关的jar包

    import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpResponse; import...

    com.springsource.org.apache.commons.io-1.4.0.jar

    jar包分享,你懂的 com.springsource.org.apache.commons.io-1.4.0.jar

    import org.apache.http

    import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpResponse; import...

    org.apache.http源代码和jar包

    该jar包包含: import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.HttpRequest;...可以解决Android-SDK新更新之后,使用http缺少org.apache.http的一些问题.

    org.apache.http jar包

    org.apache.http jar包 import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpRequestInterceptor; import org....

    com.springsource.org.apache.taglibs.standard-1.1.2.jar

    com.springsource.org.apache.taglibs.standard-1.1.2.jar

    apache与IIS合成配置

    IIS和apache合二为一,可以方便管理。

    php5apache2.dll-php5.1.x.rar

    apache 2.2.2 + PHP5.1.4 不能运行的解决办法. 解决方法: vcredist_x86.exe php5apache2.dll httpd.exe.manifest 1.将 php5apache2.dll 覆盖掉你原来PHP目录下的 php5apache2.dll 文件. 2.将 httpd.exe....

    com.springsource.org.apache.commons.logging-sources-1.1.1.jar

    com.springsource.org.apache.commons.logging-sources-1.1.1.jar

    使用apache和IIS共用80端口的一个解决方案

    使用apache和IIS共用80端口的一个解决方案

    org.apache.http.jar包官方免费版

    org.apache.http.jar包是一款非常不错且十分常用的jar包,如果没有org.apache.http.jar包,Apache与http的链接将会出现错误等现象,本站提供了org.apache.http.jar包下载地址,有需要的朋友们就来下载使用吧。...

    可用org.apache.commons.httpclient-3.1.0.jar.zip

    import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods....

    org.apache.http.httpentity jar包-系列jar包

    import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.scheme.Scheme; ...

    org.apache.http.legacy.jar

    android 6.0(api 23) SDK上进行更改之后,不再提供org.apache.http.*(只保留几个类) Android studio解决办法: 下载 org.apache.http.legacy.jar这个jar包。放置到程序app-->libs目录下,同步完成,就可以正常访问。...

Global site tag (gtag.js) - Google Analytics