Hello,

I have a question about the servlet extention of PHP from Sam Ruby. If 2 people try to connect at the same time on the PHP servlet, than Tomcat crashes. I hat the problem too that the PHP servlet doesn't work really good with frame. Then I implement the interface "SingleThreadModel" in the servlet.java than I works good.

But in every case, IT IS NOT STABLE!!!!!

I check and check and check my tomcat configuration, compile with all possible JDK and this piece of code it not stable.

Now, I would like to go inside and understand why it is not stable. It's not a easy work because you can't really debug and the "Java extension for PHP" is wrote in Java, C and JNI. I wonder the writter of this code and would be happy about all suggestion about how can I debug with such different languages.

Olivier

    4 months later

    I've had the best results with the Tomcat 3.1 rpm under Red Hat Linux, but you are right. The servlet has stability problems because of the use of global variables in the servlet. When the second simultaneous request is made, it sets the global variables to new values specific to the second request. By the time a callback is made to the servlet from the C code, it tries writing the results of the first response to the output stream of the second response. I'm experimenting with some solutions myself and I'll post them if I succeed.

      Write a Reply...