php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27423 Session hang
Submitted: 2004-02-27 10:35 UTC Modified: 2004-02-28 04:39 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ypout at mail dot ru Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.4 OS: Linux 2.4.25
Private report: No CVE-ID: None
 [2004-02-27 10:35 UTC] ypout at mail dot ru
Description:
------------
PHP sessions will hang if an external command is executed either through system() or the popen() calls. The session restores as soon as the external command terminates. The problem is when I try to follow another link in a multiframed view.



Reproduce code:
---------------
session_start();
.....
.....

set_time_limit(0);
ignore_user_abort(TRUE);
system($cmd, $sys_res); // Takes very long

.....

note (I tried popen aswell)

Expected result:
----------------
does not matter

Actual result:
--------------
does not matter

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-27 23:46 UTC] irchtml@php.net
Try a call to session_write_close() before the system()/popen() call.
 [2004-02-28 04:39 UTC] irchtml@php.net
The problem is that the session files are locked to prevent concurrent writes so other requests for the same session while the provided code is still executing will not allow access.  session_write_close() will write the session data and release the lock on the file, allowing subsequent requests access to it.  There's a little more info on the session_write_close manual page (http://php.net/session_write_close).

Status -> Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 22:01:26 2024 UTC