Author | Topic: Internal server error... | |
---|---|---|
Thomas Braun | Internal server error... on Mon, 06 Feb 2006 17:30:41 +0100 Hi, I just copied a WAA form that worked without a problem and simply changed the "WAA_FORM" value... but out of the sudden, I keep getting an "internal server error" - the Apache error log says: [Mon Feb 06 17:21:21 2006] [error] [client 127.0.0.1] Premature end of script headers: waa1gate.exe, referer: http://localhost/cgi-bin/waa1gate.exe The form function referred to by "WAA_FORM" exists and the "old" version of the form (the one with the different form function) is still woking without problems. The html code is as follows: ... <FORM ACTION="/cgi-bin/waa1gate.exe" METHOD=POST> <input type=hidden name="WAA_PACKAGE" value="EL_REG"> <input type=hidden name="WAA_FORM" value="VisaReq"> <input type=hidden name="WAA_HTML3CLASS" value="ShopHtml"> <input type=hidden name="EVENTID" value="49"> <input type=hidden name="DEL_ID" value="46"> <input type=hidden name="DEL_PWD" value="M4QHH8wQ "> <input type=submit value="Submit request for ölkjh ökjl" > </form> ... Any ideas, what could be the cause of this? TIA & regards Thomas | |
Vladimir Iahnenco | Re: Internal server error... on Mon, 06 Feb 2006 12:28:30 -0500 Thomas, Did you try to give your form another name, for example just to add any character to the old form name, which didn't cause any problems? Did you try to check form values in the debugger? Regards, Vladimir "Thomas Braun" <spam@software-braun.de> wrote in message news:p7smw4kf9us1.1mkyvv5sg9dc5.dlg@40tude.net... > Hi, > > I just copied a WAA form that worked without a problem > and simply changed the "WAA_FORM" value... but out of the sudden, I keep > getting an "internal server error" - the Apache error log says: > > [Mon Feb 06 17:21:21 2006] [error] [client 127.0.0.1] Premature end of > script headers: waa1gate.exe, referer: > http://localhost/cgi-bin/waa1gate.exe > > The form function referred to by "WAA_FORM" exists and the "old" version > of > the form (the one with the different form function) is still woking > without > problems. > > The html code is as follows: > > ... > <FORM ACTION="/cgi-bin/waa1gate.exe" METHOD=POST> > <input type=hidden name="WAA_PACKAGE" value="EL_REG"> > <input type=hidden name="WAA_FORM" value="VisaReq"> > <input type=hidden name="WAA_HTML3CLASS" value="ShopHtml"> > <input type=hidden name="EVENTID" value="49"> > <input type=hidden name="DEL_ID" value="46"> > <input type=hidden name="DEL_PWD" value="M4QHH8wQ "> > <input type=submit value="Submit request for lkjh kjl" > > </form> > ... > > Any ideas, what could be the cause of this? > > TIA & regards > Thomas | |
Thomas Braun | Re: Internal server error... on Tue, 07 Feb 2006 08:23:02 +0100 Vladimir Iahnenco wrote: > Thomas, > Did you try to give your form another name, for example just to add any > character to the old form name, which didn't cause any problems? > Did you try to check form values in the debugger? Thanks Vladimir ... Stupid me! Using the debugger reveals that in one specific case my form function returns without sending any html back to the browser... The internal server error message led me to the false conclusion that the form function wasn't called at all. best regards Thomas | |
Phil Ide | Re: Internal server error... on Tue, 07 Feb 2006 10:45:21 +0000 Thomas, > Stupid me! Using the debugger reveals that in one specific case my form > function returns without sending any html back to the browser... > > The internal server error message led me to the false conclusion that the > form function wasn't called at all. ROFL. FYI, "Premature end of script headers" literally means that the called routine did not return a proper response. More specifically, a response should look like this: [headers] CRLF [data] An example: <<< begin example HTTP/1.1 200 OK Date: Tue, 07 Feb 2006 10:37:34 GMT Server: Apache/2.0.48 (Win32) SVN/1.0.8 mod_ssl/2.0.48 OpenSSL/0.9.7c DAV/2 mod_cntr/2.5.6 mod_perl/2.0.1 Perl/v5.8.4 Last-Modified: Sun, 07 Oct 2001 11:00:00 GMT ETag: "1243-314-a334cc00" Accept-Ranges: bytes Vary: Accept-Encoding,User-Agent Content-Encoding: gzip Content-Length: 437 Content-Type: text/html; charset=ISO-8859-1 data... <<< end example In the above example, the data is compressed, so I've replaced the data component with "data...". If the data component is missing, or if the headers are missing, you'll get a premature end of script headers. I belive that Apache requires a script to return a minimum of a Content-Type header plus the data component. If these are included, then any further errors (such as wrong mime-type or invalid length) should be detected/handled by the client application. Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** Despite the delicious irony, I will not force two heroes to fight each other in the arena. [Things I'd do as an Evil Overlord] | |
Thomas Braun | Re: Internal server error... on Tue, 07 Feb 2006 16:35:15 +0100 Phil Ide wrote: > Content-Type: text/html; charset=ISO-8859-1 > > data... > <<< end example > > In the above example, the data is compressed, so I've replaced the data > component with "data...". Wow - very efficient compression algorithm I think I deserve a nomination for the "how to shoot your own foot" award for February... Thomas | |
Vladimir Iahnenco | Re: Internal server error... on Tue, 07 Feb 2006 12:01:13 -0500 Phil, Are you using waa2 to read/decompress your data (data as attachment) or assign your compressed data to an html input element? Thanks, Vladimir "Phil Ide" <phil@idep.org.uk> wrote in message news:1dww3zogzzpax.dlg@idep.org.uk... > Thomas, > >> Stupid me! Using the debugger reveals that in one specific case my form >> function returns without sending any html back to the browser... >> >> The internal server error message led me to the false conclusion that the >> form function wasn't called at all. > > ROFL. > > FYI, "Premature end of script headers" literally means that the called > routine did not return a proper response. More specifically, a response > should look like this: > > [headers] > CRLF > [data] > > An example: > > <<< begin example > HTTP/1.1 200 OK > Date: Tue, 07 Feb 2006 10:37:34 GMT > Server: Apache/2.0.48 (Win32) SVN/1.0.8 mod_ssl/2.0.48 OpenSSL/0.9.7c > DAV/2 > mod_cntr/2.5.6 mod_perl/2.0.1 Perl/v5.8.4 > Last-Modified: Sun, 07 Oct 2001 11:00:00 GMT > ETag: "1243-314-a334cc00" > Accept-Ranges: bytes > Vary: Accept-Encoding,User-Agent > Content-Encoding: gzip > Content-Length: 437 > Content-Type: text/html; charset=ISO-8859-1 > > data... > <<< end example > > In the above example, the data is compressed, so I've replaced the data > component with "data...". > > If the data component is missing, or if the headers are missing, you'll > get > a premature end of script headers. I belive that Apache requires a > script > to return a minimum of a Content-Type header plus the data component. If > these are included, then any further errors (such as wrong mime-type or > invalid length) should be detected/handled by the client application. > > Regards, > -- > Phil Ide > > *************************************** > * Xbase++ FAQ, Libraries and Sources: * > * goto: http://www.idep.org.uk/xbase * > *************************************** > > Despite the delicious irony, I will not force two heroes to fight each > other > in the arena. > [Things I'd do as an Evil Overlord] | |
Sander Elias | Re: Internal server error... on Wed, 08 Feb 2006 08:45:14 +0100 Vladimir, >Are you using waa2 to read/decompress your data (data as attachment) or >assign your compressed data to an html input element? He has told his apache server to compress data. this is a function off a web server. xb2.net has similar capabilities. regards Sander Elias Regards Sander Elias | |
Phil Ide | Re: Internal server error... on Wed, 08 Feb 2006 12:18:37 +0000 Vladimir, > Phil, > Are you using waa2 to read/decompress your data (data as attachment) or > assign your compressed data to an html input element? As Sander said, this is a function of the web server. It is implemented by default in Xb2.NET. To implement it in Apache, modify httpd.conf: # make sure this is loaded: LoadModule deflate_module modules/mod_deflate.so # ensure this is defined in the master server config: DeflateFilterNote ratio AddOutputFilterByType DEFLATE text/html text/plain text/xml # make sure your root location looks like this # (this is probably already configured anyway) # <Location /> # # Insert filter SetOutputFilter DEFLATE # ## Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # ## Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # ## MSIE masquerades as Netscape, but it is fine BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # # Don't compress images SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png|pdf)$ no-gzip dont-vary # # # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary # </Location> Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** I will offer oracles the choice of working exclusively for me or being executed. [Things I'd do as an Evil Overlord] |