|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10146 PHP Servlet is not thread-safe
Submitted: 2001-04-03 18:08 UTC Modified: 2002-03-25 00:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rthornto at insight dot com Assigned:
Status: No Feedback Package: Java related
PHP Version: 4.0.4pl1 OS: RedHat Linux 7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
23 + 19 = ?
Subscribe to this entry?

 [2001-04-03 18:08 UTC] rthornto at insight dot 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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-24 06:06 UTC]
Please test with  PHP 4.1.1+JDK 1.2 and report the result back Thanks.
 [2002-03-25 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Sep 24 11:01:25 2023 UTC