×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

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

cyranoVR (518628) writes | more than 8 years ago

PHP 6

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.

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.

6 comments

Of course (1)

gmhowell (26755) | more than 8 years ago | (#14179058)

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.

Re:Of course (1)

buffer-overflowed (588867) | more than 8 years ago | (#14179384)

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.

Re:Of course (1)

cyranoVR (518628) | more than 8 years ago | (#14179938)

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.

Note to PHP fans that might be reading... (1)

cyranoVR (518628) | more than 8 years ago | (#14179203)

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.
Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...