From:             [EMAIL PROTECTED]
Operating system: RedHat Linux 7.0
PHP version:      4.0.4pl1
PHP Bug Type:     Java related
Bug description:  PHP Servlet is not thread-safe

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 Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to