NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Transferring debugging session via IFRAME element


Joined: 30 May 2006
Posts: 95
Reply with quote
Hello guys,

can u help me please anybody, how can I transfer debugging session into iframe element?

I have 2 files - parent file would start debugging session and later include the HTML iframe element.
However, due to security policy, iframe cannot see session of the parent document.

I have register_globals = OFF

I tried to transfer session-related variables from parent file into iframe src file like this...

<?php
// this is parent file with working debugging session
// transfer session IDs into iframe
$sess_name = session_name();
$sess_id = session_id($sess_name);
$urlpar = '?sess_name='.$sess_name.'&sess_id='.$sess_id.'&'.$urlpar;

if(isset($_REQUEST['DBGSESSID'])){
$urlpar .= "&DBGSESSID=".$_REQUEST['DBGSESSID'];
$urlDBG = '?DBGSESSID=12345679@85.216.179.211:7869';
}

if(isset($_REQUEST['PHPSESSID'])){
$urlpar .= "&PHPSESSID=".$_REQUEST['PHPSESSID'];
}
?>

<iframe width="910" height="1000" src="<?php echo $url; ?>" name="iframe" id="iframe" class="iframe" frameborder="0" scrolling="auto" marginheight="0" marginwidth="0" align="left" style="padding: 0px; margin: 0px 0px 0px 10px; border: 0px solid #CCCCCC;">
Your browser does not support iFrames... Please upgrade to FireFox 1.5+, IE 5.5+ or Opera 7.5+.
</iframe>


Then in iframe file I would read GET parameters...

<?php

// this is iframe src file with always failing debug session

$sess_name = $_REQUEST['sess_name'];
$sess_id = $_REQUEST['sess_id'];
session_name($sess_name);
session_id($sess_id);
session_start();

?>

... which works OK for PHP session, but NOT for debugging session.

I am getting constantly warning : FAILED MAPPING FILE.

Does anybody know how to fix this..?

Thanx in advance.
Lubos
View user's profileFind all posts by lubosdzSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
FAILED MAPPING FILE

this error has no relation to the debugger. Well, certainly it has a little but definitely iframe is not involved.
Whenever you have anything initiating a debug session, it must be a thing known as a script file with its full path and URL the server is invoked with. Translation between the two spaces is named "mapping" there.
If this mapping is not set, you'll get problems.
Please check this post for further details:
howto-set-project-mapping-t2135.html

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


Joined: 30 May 2006
Posts: 95
Reply with quote
dmitri wrote:
it must be a thing known as a script file with its full path and URL the server is invoked with.


Hi Dmitri,

thanx a lot for your response.
I believe that iframe always has full and valid src path pointing to existing file.

I forgot to add, that this is a JOOMLA component (admin part) being written by myself.
As I have learned, joomla handles sessions differently for components and modules, so there might be some problem with starting the session.
There are more sessions started so I guess there might be some problem with starting the proper session.

When I tried:
session.use_trans_sid = 1
it also does not seem to help...Sad

The most interesting thing is, that everything works OK without having debugging session started.
Once I start debugging and iframe src file is invoked, I will get mapping error message.

Anyway, I will study mapping settings, particularly Example #4 (Single Project with separation of Web Root and libraries, both visible on workspace.
I think possible solution might be adding some additional mapping in project settings for this iframe.

Thank u very much.
Lubos
View user's profileFind all posts by lubosdzSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
FYI debugger session has no relation to php sessions.
To get debugger started, you need DBGSESSID with appropriate value delivered to php before the very first line of the script gets execution. It can be done via post, get or cookie. Please take a look at this FAQ post:
http://forum.nusphere.com/howto-run-debug-session-t585.html

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Transferring debugging session via IFRAME element
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