Re: Link to .php page with session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stuart wrote:

2009/6/16 santel <santel@xxxxxxxxx>:
Hi,

I have a .php page that use sessions and shows a file .FLV by
transcoding, on the fly, from any format video to
FLV using a shell command [ system("/usr/bin/ffmpeg -re -i ./file.wmv -f flv
-an -sameq -") ].

In a .php page:
case 1): if j put a link to any page without session, all is ok;
case 2): if j put a link to .php page with session -->
      when j click the link, the link take place only after
      system() command execution end.

Is there a way to obtain  case 1) behaviour  also  in case 2)  ?

I may have interpreted your problem incorrectly, but I think your
problem is due to the session data not being saved until the script
has finished running, including the system call. To get around this
you can save and close the session before calling system using the
session_write_close [1] function. Note that after calling that you
won't be able to make any other changes to the session data in that
request.

-Stuart

[1] http://php.net/session_write_close

Hi  Stuart,


You are right, session_write_close solved the problem.

Thank you very much
Sante Luciani

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux