#18929 [Com]: Session variables do not wait for any plugins to finish execution!
| From: | sambukkaa at hotmail dot com | Date: | Fri, 16 Aug 2002 10:45:48 +0000 |
| Subject: | #18929 [Com]: Session variables do not wait for any plugins to finish execution! | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16997@lists.php.net to get a copy of this message | ||
ID: 18929
Comment by: sambukkaa@hotmail.com
Reported By: sambukkaa@hotmail.com
Status: Feedback
Bug Type: Session related
Operating System: Windows
PHP Version: 4.2.2
New Comment:
Sure, I know php very good.
The problem is that the new page is called through javascript something
like this:
function Play (id, band, player)
{
window.open("newpage.php,"toolbar=no,width=800,height=600,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no");
}
so there is no way to use require() function!
Previous Comments:
------------------------------------------------------------------------
[2002-08-15 19:36:15] kalowsky@php.net
You want PHP to wait for a page to finish loading? Use the require()
statement.. But how is this a bug in PHP?
------------------------------------------------------------------------
[2002-08-15 19:13:09] sambukkaa@hotmail.com
It is not really a bug but some basic nonsolved situation!
Session variables do not wait for any plug-ins to finish execution!
Example:
<!-- this HTML code starts the Realmedia plugin by calling a URL from
another file and before that, with php we set a session variable to
some value: -->
<?$SESSION['session_val']="1";?>
<OBJECT ID=RAOCX CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
HEIGHT="30" WIDTH="300">
<PARAM NAME="CONTROLS" VALUE="ControlPanel">
<PARAM NAME="AUTOSTART" Value="true">
<PARAM NAME="LOOP" Value="false">
<param name="CONSOLE" value="cons1">
<PARAM NAME="SRC" VALUE="url.php">
<embed height="26" width="300" CONTROLS="ControlPanel "
src="url.php"
type="audio/x-pn-realaudio-plugin" autostart=true LOOP=false
NOJAVA=TRUE>
</embed>
</OBJECT>
here is the content of the url.php:
<?
if(isset($SESSION['session_val'])&&
$SESSION['session_val']=="1")
{
$link ="http://myserver/realmediafilm.rm";
echo $link;
// reset the session
$SESSION['session_val']="";
}
?>
logically it looks like that it will work but it doesn't :((
I have found out that it takes some time for php to load the
URL from the url.php file but the session variable will be set to ""
before realmedia will have a chance to get the URL out of the url.php
file.
It seams to me that php do not wait for plug-ins finishing before
executing the rest of the code.
Well, it is a very important issue for setting security access but
unfortunatelly it doesn't exist.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18929&edit=1