How to use DBGSESSID |
Site Admin
|
"clienthost" tells the debugger to find the HTTP request origin (IP Address) and connect back to this host. Normally the requests are sent by your machine and therefore IP Address matches the address where you run PhpED. In case of inter-server communications all three machines (server A, server B and PhpED's) can be different.
So you have to use either real IP of your client machine, or localhost if you use SSH tunnel to server B. |
||||||||||||
_________________ The PHP IDE team |
|
I changed it to localhost and it still does not work. The debugger does not go into the cURL line.
|
||||||||||||
|
|
Just so we are clear here is the current code I am trying:
$url= JURI::root() . "geof/api.php?zipcode=" . $postal_code . "?DBGSESSID=99@127.0.0.1:7869:d=1"; $curl_handle=curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $url); curl_setopt($curl_handle, CURLOPT_TIMEOUT, 3); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); $data=curl_exec($curl_handle); curl_close($curl_handle); $data=json_decode($data); I changed the IP address and I changed the session ID to 99 thinking that might help. I put a breakpoint on $data=curl_exec($curl_handle); and then press F7 and the debugger just goes to the next line. It takes a couple of seconds, so it is running the code, I just cannot see it in the debugger. I am using an SSH tunnel. Please HELP. Thanks, Paul. |
||||||||||||
|
Site Admin
|
changing IP address to an arbitrary one does never help until you use right address.
In case of "localhost" or "127.0.0.1" it would work if a) you are running PhpED on the same host with that (remote) server pointed by JURI::root() or you have SSH tunnel between that server and your machine where you run phped b) you have php debugger installed on that web server c) you have php debugger properly configured (allowed outgoing connections) on that web server |
||||||||||||
_________________ The PHP IDE team |
|
This is SO frustrating. I have been trying to get an simple answer for almost a week. I used the "official" support form and no response. I have had this product for years and kept support for years and have been very happy with it.
I said I was using a tunnel. I said that debugging was working fine. I said i was having an issue only when calling curl. Please help. I have a urgent need to debug this one last thing that is preventing me from going live. Now I have to wait another two days. Again, I am VERY frustrated with this. Paul. |
||||||||||||
|
Guru master
|
Just something I noticed.
You have:
Should that be:
So you have & before DBGSESSID because it is an additional query parameter. |
||||||||||||||||
|
Site Admin
|
You can check your 2nd server using Project settings Wizard - just create a new project for it and go through all the steps.
Alternatively you can check the tunnel by running telnet 127.0.0.1 7869 on that server. DbgListener should see incoming connection. If it does not react at all, something goes wrong either on the server side, or on your client machine. Check - port numbers (ddi you configure listener for 7869 port?), check firewalls, check tunnel direction and so forth. If connection goes through telnet but still does not go through web server, check application-level security. Under windows it's controlled by firewall (3rd party and built-in), under Linux it's controlled by Linux SE. Enabled logs and check them after an attempt to establish connection. |
||||||||||||
_________________ The PHP IDE team |
|
The answer you gave seems to be related to the debugging not working at all.
It is working fine as I keep saying - however it just does not work in the cURL statement. Please HELP! |
||||||||||||
Last edited by parisi on Mon Apr 02, 2012 7:07 pm; edited 1 time in total |
Guru master
|
Have you fixed your query parameter string?
Is the server (both the page and the api.php) on the same server and is that server localhost? Have you considered using DebugBreak() in api.php to force a breakpoint? Bear in mind that when api.php runs, if it activates the debugger then depending on your PhpED settings it may run as a session in the background. |
||||||||||||
|
|
That was it --- it was using a ? rather than a &.
Thank you so very much! FYI - the code was on the same server. Also, I did try to use the DebugBreak but that did not do anything. In any event - this is now working as expected. Again - thank you so very very much for you help! |
||||||||||||
|
Site Admin
|
DebugBreak would work fine if you used DBGSESSID's value as an argument:
DebugBreak('99@127.0.0.1:7869:d=1'); otherwise it tries to connect back at the address found in REMOTE_ADDR which is the 1st server's address in your case and it's not where you run PhpED, right? |
||||||||||||
_________________ The PHP IDE team |
How to use DBGSESSID |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by