问题1:
小弟初学PHP,想用Zend Studio7连接服务器调试
按照网上的说法,在服务器端(Windows平台,IP地址是192.168.0.38)装好ZEND DEBGUGER。我PHP版本是5.2.6,在php.ini中
[zend]
zend_extension_ts="C:\Program Files\Zend\ZendDebugger-5.2.14\php-5.2.x\ZendDebugger.dll"
zend_debugger.allow_hosts=192.168.0.38/24,127.0.0.1/32
zend_debugger.expose_remotely=always
并通过phpinfo()看到了ZendDebugger的信息。再把dummy.php考到服务器根目录下,通过我本机(192.168.0.22)的IE可以访问http://192.168.0.38/dummy.php 然后在本机的Zend Studio7的Debugger 里PHP web Server,配置Enter the URL that points to the document rootof this server里输入了“http://192.168.0.38”(服务器的IP地址)
点击Test Debugger时报
"A timeout occurred when the debug server attempted to connect to the following cilent hots/IPS
-192.168.0.38
-127.0.0.1" 通过服务器端 Apache的链接日志看到
192.168.0.22 - - [29/Mar/2010:17:10:17 +0800] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
192.168.0.22 - - [29/Mar/2010:17:10:17 +0800] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
通过服务器端 Apache的错误日志看到
[Zend Debugger] Cannot connect to host 192.168.0.38 (这个是本机服务器IP啊,怎么会链接不上呢~)
[Zend Debugger] Cannot connect to host 127.0.0.1
本怀疑是服务器的天网防火墙拦包了,于是关掉了服务器的天网防火墙。结果更神奇的问题2产生了。问题2:
服务器端有个天网防火墙,当开着它的时候,我用本机IE访问http://192.168.0.38(服务器),可以打开我写的index.php网页(里面就有1条phpinfo()语句)只是Test Debugger时报问题1,可如果我关闭天网防火墙的话,我本机就访问不了http://192.168.0.38/index.php,在服务器的IE中“http://192.168.0.38”还是可以访问的。Zend Studio7 点Test Debugger,报“A TimeOut has occurred on 'http://192.168.0.38'”这个错误 我没写错,是开着防火墙能访问,关上防火墙不能访问。那位神人能解释一下这是为什么?顺便帮我把问题1和2解决一下。
小弟初学PHP,想用Zend Studio7连接服务器调试
按照网上的说法,在服务器端(Windows平台,IP地址是192.168.0.38)装好ZEND DEBGUGER。我PHP版本是5.2.6,在php.ini中
[zend]
zend_extension_ts="C:\Program Files\Zend\ZendDebugger-5.2.14\php-5.2.x\ZendDebugger.dll"
zend_debugger.allow_hosts=192.168.0.38/24,127.0.0.1/32
zend_debugger.expose_remotely=always
并通过phpinfo()看到了ZendDebugger的信息。再把dummy.php考到服务器根目录下,通过我本机(192.168.0.22)的IE可以访问http://192.168.0.38/dummy.php 然后在本机的Zend Studio7的Debugger 里PHP web Server,配置Enter the URL that points to the document rootof this server里输入了“http://192.168.0.38”(服务器的IP地址)
点击Test Debugger时报
"A timeout occurred when the debug server attempted to connect to the following cilent hots/IPS
-192.168.0.38
-127.0.0.1" 通过服务器端 Apache的链接日志看到
192.168.0.22 - - [29/Mar/2010:17:10:17 +0800] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
192.168.0.22 - - [29/Mar/2010:17:10:17 +0800] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
通过服务器端 Apache的错误日志看到
[Zend Debugger] Cannot connect to host 192.168.0.38 (这个是本机服务器IP啊,怎么会链接不上呢~)
[Zend Debugger] Cannot connect to host 127.0.0.1
本怀疑是服务器的天网防火墙拦包了,于是关掉了服务器的天网防火墙。结果更神奇的问题2产生了。问题2:
服务器端有个天网防火墙,当开着它的时候,我用本机IE访问http://192.168.0.38(服务器),可以打开我写的index.php网页(里面就有1条phpinfo()语句)只是Test Debugger时报问题1,可如果我关闭天网防火墙的话,我本机就访问不了http://192.168.0.38/index.php,在服务器的IE中“http://192.168.0.38”还是可以访问的。Zend Studio7 点Test Debugger,报“A TimeOut has occurred on 'http://192.168.0.38'”这个错误 我没写错,是开着防火墙能访问,关上防火墙不能访问。那位神人能解释一下这是为什么?顺便帮我把问题1和2解决一下。
算了,换到本机(192.168.0.22)上做测试吧,环境都搭好了,http://192.168.0.22/index.php,Zend Debugger也配完了,通过phpinfo()能看到。然后我在本机的Zend Studio7的Debugger 里PHP web Server,配置Enter the URL that points to the document rootof this server里改成了“http://192.168.0.22”,点击Test Debugger 为什么对话框里还报"testing communcation whit client host/IP:'192.168.0.38"呢?我把Zend Studio7删掉后重装,好像上次装的配置依然生效。问题依然存在。疯了疯了~~
哪位高人能帮忙解决一下
问题1解决了~不知算不算Zend Studio7的Bug,有时修改Enter the URL that points to the document rootof this server无效,即使重装Zend Studio7也无效,要把Documents and Settings\Zend\workspaces\DefaultWorkspace7 的文件夹删掉,这个文件夹存放着你关于本机Zend Studio7的默认项目设置。然后重新再设一遍Enter the URL that points to the document rootof this server即可。