php中exec, system调用其它脚本,脚本中又将一些脚本放入后台,可能会话会被挂起,也就是其它所有的请求都会被阻塞,点任何链接都没反应。 似乎与这个问题有关:
What happens is that the child process which is called by the system() ,exec() or shell_exec() command holds the file lock on the parent process, thus locking the session file. Thus, the session file being locked session_start(); function cannot access the file. This is due to to open file descriptors locking the session file.Your entire session will be locked, so none of the pages of the website can be opened ( which are under session control ) unless you change the browser or delete cookies.
参考如下链接: http://www.think-lamp.com/2009/04/http-sessions-and-background- processes-on-apache-php/ http://bugs.php.net/bug.php?id=10675 http://cn2.php.net/session_write_close 遇到过相同问题的自己去看了