php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #37574 Add warning about session on the documentation page for Program Execution
Submitted: 2006-05-24 07:08 UTC Modified: 2007-08-17 21:08 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: dr at sweety dot li Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Win NT
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dr at sweety dot li
New email:
PHP Version: OS:

 

 [2006-05-24 07:08 UTC] dr at sweety dot li
Description:
------------
I'm referring to the "bug" descriped here : http://bugs.php.net/bug.php?id=10675&edit=1 . I would recommend that you add a warning on the "Program Execution Functions" documentation page which basically advises the programmer to close any open session before calling exec() or other related functions as otherwise the PHP script may hang!

Reproduce code:
---------------
session_start();
exec('ls');

// Save this, open the page in a browser and reload repeatedly. After several successful reloads, the page will just hang

Expected result:
----------------
nothing, the correct code seems to be:

session_start();
/*
.... code ...
*/
session_write_close();
exec('ls');
@session_start();

// There's no locking in this code


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-12 21:51 UTC] milegend at hotmail dot com
I think someone should take a look at this bug. It has been around for too long. It has been reported before at: http://bugs.php.net/bug.php?id=22526. If it isn't a bug it should be mentioned on the manual page.

Thanks
 [2007-08-17 21:08 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"Open files with lock (especially open sessions) should be closed before executing a program in the bacground."
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 14:00:01 2025 UTC