[28 Mar 2002 3:12pm CET] okapi at yahoo dot com
I'm running Tomcat 4.0.3 with PHP 4.1.2 as a servlet. Running Sun JDK/JRE v1.4. When I run phpinfo() on a test page, it returns part of the information with no graphics and shortly after crashes. This happens every time I run it.
Starting service Tomcat-Standalone
Starting service Tomcat-Apache
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0xB7C84F3
Library=C:\Program Files\Apache Tomcat 4.0\php\ext\php4ts.dll
Current Java thread:
at net.php.reflect.setResultFromObject(Native Method)
[20 Feb 2003 8:29am CET] email@example.com
updated PHP version..propably should change that to "infinite" since therearen't any developers even trying to fix the servlet sapi.
[30 Oct 2003 9:10pm CET] firstname.lastname@example.org
This will be revisited in PHP 5 at earliest. Will not be fixed in PHP 4.
** SIGH **
Checking the localhost_log, I found some useful information:
2005-12-04 12:15:19 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.lang.IllegalStateException: getWriter() has already been called for this response
Now investigating if there's some way I can fix this myself...
[INSTANT UPDATE] Perhaps this?
[SON OF INSTANT UPDATE] I've immediately reached the conclusion that the above patch is the solution and that it was never integrated into the PHP core.
The PHP developers, being the arrogant and lazy lot that they are, coded the servlet sapi extension to only work with single-threaded servers (probably because it was easier) and haven't bothered to merge this patch into the main branch (or whatever) because of their own irrational hostility towards Java (e.g. "why would anyone want to do that anyway?").
Do a search in the PHP bug database, and you will see virtually every one of the bug reports involving the Servlet SAPI module as "bogus." Yes, that's right: "bogus." Obviously the problem is with the Java server (Tomcat) because, well, it's Java and not a 1337 language like PHP.
Anyway, to fix this I'd have to compile php from source on my dinky laptop (and I don't have a C++ compiler installed)...since production will be on Linux anyway, I'll just have to revisit this then.