![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | How to use DBGSESSID | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Joined: 30 Apr 2009 |
Posts: 8 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Sat Mar 24, 2012 12:15 pm |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
I have the following code which is a small part of a very large project.
$url= JURI::root() . "geo/api.php?zipcode=" . $postal_code . "?DBGSESSID=1@clienthost: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);
|
Notice on the first line I added the ?DBG...
When I run the application in the debugger everything works great until I come to the curl_exec line. I think I don't understand how to use the DBGSESSID. How do I have the debugger work for the curl call? I am new to all of this, so the more detail the better.
I have read everything I can find about DBGSESSID but can't seem to make it work. Should DBGSESSID be set from the top level calling program, if so how do I do that, and then use the same in on the first line above? Or should I just spawn a new debug session as I am doing here. The thing is the new session, 1, as indicated above, never starts.
I think I am missing something.
Thanks in advance!
Paul.
|
|
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Joined: 30 Apr 2009 |
Posts: 8 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Tue Mar 27, 2012 1:02 pm |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
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.
|
|
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Guru master
Joined: 24 Jul 2009 |
Posts: 737 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Sat Mar 31, 2012 2:59 am |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
Just something I noticed.
You have:
$url= JURI::root() . "geof/api.php?zipcode=" . $postal_code . "?DBGSESSID=99@127.0.0.1:7869:d=1"; |
Should that be:
$url= JURI::root() . "geof/api.php?zipcode=" . $postal_code . "&DBGSESSID=99@127.0.0.1:7869:d=1"; |
So you have & before DBGSESSID because it is an additional query parameter.
|
|
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
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
|
|
|
| ![](./templates/Morpheus/images/spacer.gif) |