Bug #10146 Updated: PHP Servlet is not thread-safe
| From: | yohgaki@php.net | Date: | Sun, 24 Feb 2002 11:06:45 +0000 |
| Subject: | Bug #10146 Updated: PHP Servlet is not thread-safe | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-904@lists.php.net to get a copy of this message | ||
ID: 10146
Updated by: yohgaki@php.net
Reported By: rthornto@insight.com
Status: Open
Bug Type: Java related
Operating System: RedHat Linux 7.0
PHP Version: 4.0.4pl1
New Comment:
Please test with PHP 4.1.1+JDK 1.2 and report the result back Thanks.
Previous Comments:
------------------------------------------------------------------------
[2001-04-03 18:08:46] rthornto@insight.com
The PHP servlet is not thread-safe. This causes some versions of
Tomcat to crash. But while Tomcat 3.1 will run pages without crashing,
large pages loaded very close together end up writing to the same
output stream. This is caused by the HttpServletRequest and
HttpServletResponse objects being declared as instance objects within
the net.php.servlet class. Less resource-intensive pages finish
processing fast enough that the output streams don't collide, but when
a request is made before a large request is finished, the result of the
the first response will get printed with the second.
One possible solution is that if multiple request and response objects
could be stored (e.g in a hash) and matched back up in the
net.php.servlet callback methods, the servlet would then be
thread-safe.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=10146&edit=1