Bug #10744 Updated: session_start() "serializes" exec
| From: | derick@php.net | Date: | Thu, 10 May 2001 13:13:41 +0000 |
| Subject: | Bug #10744 Updated: session_start() "serializes" exec | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-54684@lists.php.net to get a copy of this message | ||
ID: 10744
Updated by: derick
Reported By: fperillo@katamail.com
Old-Status: Open
Status: Closed
Bug Type: *Session related
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
That is by design (for file based session storage at least).
See http://www.php.net/bugs.php?id=6287&edit=1
and
http://bugs.php.net/?id=10675&edit=1
All access to session variables in PHP4 is serialized. If you want to
start some daemon from inside your php script make it to close all
unused file handles at startup or close the session before exec().
oleg
Previous Comments:
---------------------------------------------------------------------------
[2001-05-09 04:39:31] fperillo@katamail.com
Try this in a script:
<?php
exec( "/bin/sleep 30 >/dev/null 2>&1 </dev/null &" ) ;
echo "Done !!" ;
?>
Now call it from the browser several time (Reload button). If you type a ps ax command you will see
several "sleep 30" processes. Wait all the processes to stop.
Now put session_start() as the first line. Press RELOAD: it completes OK. Now press RELOAD again: it
hangs !!! It waits for the sleep to terminate before starting the next !! So if you press RELOAD 10
times you need to wait 300 seconds !!
Is it a normal behaviour ? How can I have a process completely in the background ?
Francesco
PS: I tried to put the nohup in the exec string with no success
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10744&edit=2