+shttpd-general
First, to prove the theory about slow get_cgi, I would put a small delay at
the end of your PHP script, to slow down it a bit. If this fixes the
problem, then the path worth pursuing further.
On Sun, Jun 8, 2008 at 2:15 PM, R. Christian Tessarek <[EMAIL PROTECTED]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> first of all: a really, really big "thank you" for your great http daemon.
> really fast, really small, just great. on unix, at least, which actually is
> my platform of choice, but i want to use shttpd on windows 2000 as well and
> ran into some problems with php as cgi. i think i found at least a hint of
> the error's origin...
>
> compat_win32.c:
> 338 * Windows is a piece of crap. When this thread closes its end
> 339 * of the socket pair, the other end (get_cgi() function) may loose
> 340 * some data. I presume, this happens if get_cgi() is not fast
> enough,
> 341 * and the data written by this end does not "push-ed" to the other
> 342 * end socket buffer. So after closesocket() the remaining data is
> 343 * gone. If I put shutdown() before closesocket(), that seems to
> 344 * fix the problem, but I am not sure this is the right fix.
> 345 * XXX (submitted by James Marshall) we do not do shutdown() on
> UNIX.
> 346 * If fork() is called from user callback, shutdown() messes up
> things.
>
> that could be the source of the problem, but the circumstances are the
> really
> strange thing: if i'm using firefox 2.0.0.14 to access
> http://localhost:89/test01.pht (a simple php script with nothing but <?php
> phpinfo(); ?> as content) the i get a "connection reset"-page from firefox
> in
> about 80% of all reloads. sometimes it just doesnt load the php-logo gfx in
> the upper right corner, sometimes it loads everything. when using ie6, it
> seems fine.
> i recompiled shttpd with the debug option enabled under mingw32/wine, but
> see
> nothing really strange in the debug logs.
> even stranger is the fact that if i query the same script
> (http://winserv3:89/test01.pht) from my linux workstation. with either
> opera9.5, firefox 2.0.0.14, ie6/wine, firefox-2.0.0.14/wine, it doesnt
> reset
> the connection. it works fine...
>
> please tell me how to get started, i dont have any clue, i'd love to help
> improving shttpd... even for a crappy platform like windows ;-) (there are
> too few (not too mem-consuming) httpd server that work well under windows
> anyways, most need cygwin and are a pain in the ass to compile and make
> them
> run without installing them into exactly the same directory they were
> compiled for..)
>
>
> platform / config details:
>
> Server: winserv3 Windows 2000 AS on VMware with ~750MB RAM on an
> AMD64/XP3000
> latest version of shttpd, config file:
> ::SNIP::
> hostname winserv3.cnetworks.ath.cx
> root D:\DEVELOPMENT\HTDOC
> ports 89
> #auth_realm winserv3.cnetworks.ath.cx
> threads 10
> systray yes
> access_log D:\DEVELOPMENT\LOG\shttpd.acc.log
> error_log D:\DEVELOPMENT\LOG\shttpd.err.log
> cgi_ext php,pht,phtm,phtml
> cgi_interp D:\DEVELOPMENT\PHP5\php-cgi.exe
> dir_list yes
> ::SNIP::
>
>
> (yes, i patched in a hostname directive since i dont want to compile-in
> authentication just for setting the correct hostname in
> _SERVER[HTTP_HOSTNAME] )
>
> PHP: precompiled (dont wanna mess with msvc) from php.net, latest stable
> version (5.2.6), not installed, just unpacked the zip to
> D:\development\php5
> the php.ini is attached as well as a debug log from several failed
> requests.
> the last one in the log was more or less sucessful, just the upper right
> php
> logo was missing, but no general connection-reset error.
>
> also attached: filename.patch containes all changes i made to the original
> source tree. the error has nothing to do with my changes, it also happens
> with your precompiled binary package shttpd.exe+php+perl.
>
> for windows, i compile shttpd.exe in a wine cmd window with these commands:
> set PATH=c:\dev-cpp\bin;%PATH%
> set LIB=c:\dev-cpp\include
> set INCLUDE=c:\dev-cpp\lib
> set CC=gcc.exe
> set CFLAGS=-D_DEBUG -DND_SSI -DNO_AUTH
> cd <sourcepath>
> mingw32-make.exe mingw
>
> where c:\dev-cpp\bin is the path mingw32 for windows is installed.
>
>
> thank you very much in advance, please tell me what to do. as said, i'd
> love
> to help.
>
> sincerly,
> christian tessarek
>
>
>
>
>
>
> - --
> - --------------------------------
> look up my OpenPGP Public Key (ID: 0x3595389E) at http://wwwkeys.pgp.net/
>
> NEW: http://aufl.info - Austrian User Group for Linux & Co.
> *Moderator*
>
> please read these links regarding RFID and why it's bad for everyone:
> http://www.foebud.org/rfid/das-problem
> http://www.spychips.com/
> http://rfid-handbook.de/rfid/index.html
>
> please read these links regarding TCPA/DRM and why it's bad for every
> computer
> user:
> http://polishlinux.org/gnu/drm-vista-and-your-rights
> http://againsttcpa.com/
> http://www.defectivebydesign.org/
> http://www.securityfocus.com/columnists/390
>
> Those who desire to give up freedom in order to gain security or peace,
> will
> not have, nor do they deserve, either one. (Benjamin Franklin)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkhL22AACgkQryqNvTWVOJ6ncQCeLfRe0HGNE8rdKVQWEhAVkOCh
> FHEAoIbjStmzVgpTaX4xGLJhgH4yCR+8
> =duAQ
> -----END PGP SIGNATURE-----
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general