[PHP] Why are these sessionvariables empty?

2003-03-14 Thread André Rosendaal
Hi,

I created a simple example of a problem that I have with a PHP script that
works in Netscape, and in Internet Explorer when cookies are disabled, but
not in Internet Explorer when cookies are enabled. The purpose of the script
is to create a .ram file on the fly, and playback part of a streaming file.

The example consiste of the following two files:

1) test_real.php





">Open Real Playlist



2) play.php (which should be in the same directory as test_real.php)



If test_real.php is opened, and the link 'Open Real Player' is selected, 10
seconds of the streaming file are played. But not in IE with cookies
enabled. In that case, Real displayes the error message;

'unable to locate the server' [...]  rtsp://stream1.surfnet.nl?start=&end=

What you see here is that the values of $filename, $from and $to are empty.
But if you outcomment the line
header("Content-Type: audio/x-pn-realaudio;"); in play.php, the output in
the browsers reads:

rtsp://stream1.surfnet.nl/s/surfnet/real/rd2000/mpeg/sfeermontage.mpg?start=
10&end=20

which is correct. I don't understand why the variables are empty when the
header infomation is sent, but have the correct values if the header is not
sent. Nor do I understand why this does work in Netscape and IT and cookies
disabled. A bug/feature in IE?

I have spend far too much time on this, and your help is very welcome.

Cheers,
André Rosendaal

PS
- The SID implementation is fast abd dirty, I know
- dummy.ram is just a string, not a reference to an existing file: it help
IE to recognize the correct MIME type



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] arrays;session variable; empty variable

2003-02-03 Thread André Rosendaal
Hi,

I have spend several hours on the following issue, and I can't figure out
what I am doing wrong.

Consider the next function:

function CreateFileForRealPlayer () {
  global $playlist;

  $filename = $playlist[0]['url'];
  header("Content-Type: audio/x-pn-realaudio;");
  echo ($filename);
  }

This is a simplified version of the actual function: here, the function
should get a url from a session variable ($playlist), and create a Real file
on-the-fly that references to this file.

The function works in Netscape (both cookies enabled and disabled), and in
IE with cookies disabled, but not in IE when cookies are enabled. For some
reason, in that configuration the value assigned to $filename is an empty
string when it is echoed. However, it DOES have the proper value after the
line

$filename = $playlist[0]['url'];

I am certain there is nothing wrong with the session variable itself (as
said, it works in the configurations I mention above; it's the value of
$filename that behaves strangely in IE. Any ideas? I am using php 4.0.4pl1
on HP-UX, IE 6.0, Win XP client side.

TIA
André Rosendaal



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php