Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
PHP

cyranoVR's Journal: [Tomcat - PHP] The Rare "Beauty" of OSS 6

Journal by cyranoVR

http://bugs.php.net/bug.php?id=16331

[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
Apache Tomcat/4.0.3
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

Function=zend_hash_index_update_or_next_insert+0x33
Library=C:\Program Files\Apache Tomcat 4.0\php\ext\php4ts.dll

Current Java thread:
    at net.php.reflect.setResultFromObject(Native Method)

[snip stacktrace]

[20 Feb 2003 8:29am CET] sniper@php.net

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] sniper@php.net

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.

Whatever.

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.

This discussion was created by cyranoVR (518628) for Friends and Friends of Friends only, but now has been archived. No new comments can be posted.

[Tomcat - PHP] The Rare "Beauty" of OSS

Comments Filter:
  • Now investigating if there's some way I can fix this myself...

    Of course there is. You have the source. Fix it yourself you lazy shit and quit bitching it. Why you expect someone to do something like simple bug fixing when there are awesome new skins to be made for Winamp and KDE is beyond me.
    • You forgot to add:
      /me shrugs
    • Well it helps immensely if you know some basics. I would assume people know the basics of C, memory/etc.

      I mean, comeon, you're a freakin' coder right? You have to know what's going on under the hood. Otherwise, your sandbox breaks and you're maloned.

      Just more evidence that teaching in pure OO is a horrible fucking idea.
      • Well it helps immensely if you know some basics. I would assume people know the basics of C, memory/etc.

        I find that statement exquisitely ironic, considering that most PHP coders I've encountered are vainglorious hacks who cobble together web sites with cut-and-paste code. If there's any category of coder totally isolated from the "basics," its The PHP Coder.
  • Maybe you guys coded a "free" scripting language, and maybe we should be "thankful" for it...but you know what? We never asked for your bug-addled, half-baked "language" in the first place.

    Before you post some inane, knee-jerk "you don't have to use it" response, I just want to send you a pre-emptive "go to Hell," ok? Thanks for playing.
  • I found the viewCVS URL for the servlet extension:

    http://viewcvs.php.net/viewcvs.cgi/pecl/servlet/ [php.net]

If you have a procedure with 10 parameters, you probably missed some.

Working...