NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] OS X 10.4.9/DBG 3.2.3 woes


Joined: 22 Jul 2003
Posts: 19
Location: Burbank, CA
Reply with quote
Dmitri,

Your old friend Bill here... I just switched from an old Win2000 development machine to an XP system. At the same time, I upgraded to PhpED 5. Now I can't get remote debugging to work on my G5 Mac. Any help would be most appreciated.

Thanks.

Bill

Here are the relevant details.

Error message:

Quote:
Failed to start DBG session

Reason: connection to the client address 10.15.192.106:7869 is not allowed

Debugger request: "393114599756000009@10.15.192.106;d-1,p=0,c=1"
Request found in: "query string"
Target PHP version: "5.2.0"
Server API: "Apache"
Extensions API: "220060519"
Modules API: "20060613"
PHP API: "20041225"

I can telnet from 10.15.192.106 to 10.15.192.241:7869, and I have verified the listener on 10.15.192.241 sees the connection when I do.

I have turned off every proxy setting I can find, on both machines.

traceroute from 10.15.192.106 to 10.15.192.241 results in:

Quote:
10:43:14:/Downloads/dbg-3.2.3-MacOSX-10.4/PowerPC : traceroute 10.15.192.241
traceroute to 10.15.192.241 (10.15.192.241), 64 hops max, 40 byte packets
1 glndis06.am.thmulti.com (10.15.192.241) 1.006 ms 0.413 ms 0.273 ms

Other relevant details:

The server is set up to use ports 80, 443 and 6000. I get the same error with all of them.

Client Setup:

WinXP Pro Version 2002 Service Pack 2
PhpED 5.0.1 (5029)
PHP DBG Listener 3.2.1

Server Setup
:

PowerPC Mac G5
OS X 10.4.9
PHP 5.2.0

php.ini Settings
:

Quote:
; debugger
extension=dbg.so

debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=10.15.192.241
debugger.ports=7869, 10000/16
debugger.hosts_deny=All

phpinfo() results:

Quote:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with DBG v3.1.9, (C) 2000,2006, by Dmitri Dmitrienko

dbg
DBG DBG php debugger, version 3.1.9, Copyright 2001, 2006 Dmitri Dmitrienko, http://www.nusphere.com/dbg

Version 3.1.9
Linked as a shared library.
Dbg SSL not available
Dbg ip security enabled.
Profiler enabled
Target PHP version 5.2.0
Server API Apache
Extensions API 220060519
Modules API 20060613
PHP API 20041225

Directive Local Value Master Value
debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently Off Off
debugger.hosts_allow protected value protected value
debugger.hosts_deny protected value protected value
debugger.ignore_nops Off Off
debugger.JIT_enabled Off Off
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.net.chunksize 48000 48000
debugger.net.maxpacketsize 4096000 4096000
debugger.ports protected value protected value
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300

View user's profileFind all posts by kraussSend private messageAIM Address
Update


Joined: 22 Jul 2003
Posts: 19
Location: Burbank, CA
Reply with quote
On further testing, I find that the problem only occurs when trying to connect to the site that uses port 6000. The areas that use ports 80 and 443 do work.

I installed dbg-wizard in both the standard (port 443) and nonstandard (port 6000) directories. The results indicate that for port 6000, the wizard thinks that PhpED and the webserver are on the same machine, while on port 443 it thinks they're on different machines. Here's the output:

Port 6000

Quote:
* PHP Version: 5.2.1
* Web Server: Apache/1.3.33 (Darwin) PHP/5.2.1 mod_ssl/2.8.24 OpenSSL/0.9.7l
* Server Name: 10.15.192.106
* OS: Darwin
* Your Client IP Address: 10.15.192.106
* Your Server IP Address: 10.15.192.106
* Port: 6000
* Your Web Server is on the same machine with PhpED
* Path to website files: /webroot/web_internal/sites/
* Document Root is: /webroot/web_internal/sites/
* Your PHP.INI file is /usr/local/php5/lib/php.ini
* PHP extensions directory is /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
* DBG (PHP DEBUGGER) Version 3.2.3 is INSTALLED


Port 443

Quote:
* PHP Version: 5.2.1
* Web Server: Apache/1.3.33 (Darwin) PHP/5.2.1 mod_ssl/2.8.24 OpenSSL/0.9.7l
* Server Name: 10.15.192.106
* OS: Darwin
* Your Client IP Address: 10.15.192.241
* Your Server IP Address: 10.15.192.106
* Port: 443
* Your Web Server and PhpED are on different machines
* Path to website files: /webroot/webserver/secure/
* Document Root is: /webroot/webserver/secure/
* Your PHP.INI file is /usr/local/php5/lib/php.ini
* PHP extensions directory is /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
* DBG (PHP DEBUGGER) Version 3.2.3 is INSTALLED


When I added 10.15.192.106 to debugger.hosts_allow in php.ini, the error "Debugger request" entry on the error pages changes from "393115555623000024;d=1,p=0,c=1" to "393115558563500025@clienthost;d=1,p=0,c=0".

Now I'm really confused.

Bill
View user's profileFind all posts by kraussSend private messageAIM Address
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
connection to the client address 10.15.192.106:7869 is not allowed

to work with 10.15.192.106 machine you have to update your php.ini:
debugger.hosts_allow=10.15.192.241 10.15.192.106

Quote:
with DBG v3.1.9, (C) 2000,2006

you need dvg 3.2.3 in order to work with phped 5.0.1 (build 5028 and higher)

Quote:
On further testing, I find that the problem only occurs when trying to connect to the site that uses port 6000. The areas that use ports 80 and 443 do work

Seems you're using http proxy for 443 and 80 ports.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Jul 2003
Posts: 19
Location: Burbank, CA
Reply with quote
I've done both things and restarted the webserver, but continue to get the same error.

Quote:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with DBG v3.2.3, (C) 2000,2007, by Dmitri Dmitrienko


Quote:
; debugger
extension=dbg.so-5.2
;extension=dbg.so

debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=10.15.192.241 10.15.192.106
debugger.ports=7869, 10000/16
debugger.hosts_deny=All


I've confirmed again that when I telnet 7869 from the server to 10.15.192.241 that the listener opens a connection. The debugger window, however, still shows that it can't make a connection.
View user's profileFind all posts by kraussSend private messageAIM Address
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Hi Bill,

It may appear (and we got many reports) that under some environments Apache can not open outgoing connections. Please check your firewall, /etc/hosts.deny and /etc/hosts.allow. It worth to try to run fsockopen('10.15.192.241', 7869, errno, errstr) from php and check the resulting errstr and errno.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
More clues -- UPDATED 08/24/2007 9:15 am


Joined: 22 Jul 2003
Posts: 19
Location: Burbank, CA
Reply with quote
Hi Dmitri,

OLD: I tried the fsockopen() routine and got an error number of 61 -- no error string. Does that help?

NEW: My original test was conducted remotely. Now that I'm back in the office, I tried again. The fsock() test does work.

What's odd is that nothing has changed on the server (10.15.192.106) side. The changes are on the machine that runs PhpEd -- I've moved to a new machine running XP instead of Win2000, and moved to v5 of PhpEd. (Of course, I did have to upgrade the debugger module on 10.15.192.106.)

If we can't resolve this, can you suggest what configuration I should go back to so I can start debugging again?

Thanks.

Bill


Last edited by krauss on Fri Aug 24, 2007 11:11 am; edited 1 time in total
View user's profileFind all posts by kraussSend private messageAIM Address
Alternative?


Joined: 22 Jul 2003
Posts: 19
Location: Burbank, CA
Reply with quote
Hi Dmitri,

While it would be extremely nice to be able to debug on my development server, it's ultimately necessary that I be able to do so on my production server, which is a Quad-Intel XServe. Unfortunately, there doesn't seem to be an OS X Intel debug module yet.

I've traded some emails with your colleague Yury about having me compile the module for you. He suggested we might need to delay for a couple of weeks because most of Nusphere's engineers are on holiday. Is there any way we could do this sooner? Until we get remote debugging working on one or the other of my machines, I'm stuck back in the dark ages, adding "print" lines to my code to see what's going on.

Let me know what you think.

Bill
View user's profileFind all posts by kraussSend private messageAIM Address
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
OLD: I tried the fsockopen() routine and got an error number of 61 -- no error string. Does that help?

Network error 61 means "Connection refused" (read firewall rejected it)

Quote:
I can telnet from 10.15.192.106 to 10.15.192.241:7869, and I have verified the listener on 10.15.192.241 sees the connection when I do

Please check if you still can do it and 10.15.192.241 is the same machine where you tried to fsockopen() to open socket to:
fsockopen("10.15.192.241", 7869, $errno, $errstr, 10);

Quote:
What's odd is that nothing has changed on the server (10.15.192.106) side. The changes are on the machine that runs PhpEd -- I've moved to a new machine running XP instead of Win2000, and moved to v5 of PhpEd. (Of course, I did have to upgrade the debugger module on 10.15.192.106.)

It may make sense, because XP comes with firewall, whereas Win2K does not.

Quote:
If we can't resolve this, can you suggest what configuration I should go back to so I can start debugging again?

as soon as you get fsockopen to work against your client machine and dbglistener sees it, you'll be able to debug too. Verify your server firewall, your client machine firewall and all firewalls in between.

Quote:
While it would be extremely nice to be able to debug on my development server, it's ultimately necessary that I be able to do so on my production server, which is a Quad-Intel XServe

There are some performance issues with debugger in all 3.2.x versions up to 3.2.3. I'd recommend you to wait for 3.2.5 when the problems will be fixed.

Quote:
He suggested we might need to delay for a couple of weeks because most of Nusphere's engineers are on holiday.
I'm sorry, he was correct Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Jul 2003
Posts: 19
Location: Burbank, CA
Reply with quote
Hi Dmitri...

Quote:
as soon as you get fsockopen to work against your client machine and dbglistener sees it, you'll be able to debug too. Verify your server firewall, your client machine firewall and all firewalls in between.

I've verified that dbglistener does see fsockopen(), and I can telnet from 10.15.192.106 to 10.15.192.241, and that dbglistener sees that, too. Unfortunately, I still get this:

Quote:
Reason: failed to connect to the client address 10.15.192.106:7869

As I mentioned in my second post on this thread, it seems that on port 6000 the debugger sees 10.15.192.106 as the client, instead of 10.15.192.241 as it does with other ports.

At first I thought it might be related to Firefox's default port blocking, so I added port 7869 to network.security.ports.banned override. That didn't help, so I tried Explorer and get identical results.

Quote:
XP comes with firewall, whereas Win2K does not.

I've verified that Windows Firewall is disabled. And just in case, I tried adding a service entry in the Advanced settings to allow port 7869 traffic I also tried checking everything in the ICMP advanced settings tab.

Bill
View user's profileFind all posts by kraussSend private messageAIM Address
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Per our conversation by email, it appeared that there was HTTP proxy server.
After correct Debugger Host was specified in the debugger settings (tools->settings->debugger), it started working fine.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] OS X 10.4.9/DBG 3.2.3 woes
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic