<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
I neither have a Mac, nor am I a Perl expert. But I assume that it
should work, being a bunch of perl scripts. Here are some
pointers/suggestions.<br>
<br>
Am 2014-08-08 um 07:47 schrieb Kevin Jorissen:<br>
</div>
<blockquote
cite="mid:CAH+JfXmKe4wbtSA-FY1Bxcqc4T0qY=D279TuAMas_QD1nNbMqw@mail.gmail.com"
type="cite">
<div dir="ltr"><span
style="font-family:arial,sans-serif;font-size:13px"></span>When
I do so, the configuration stage passes without problems; I can
enter my login/password; I am then forwarded to (e.g.)
localhost:7890/session/change.cgi but this page does not display
- I only see "Error - Missing Header" in my browser.
<div style="font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">I can
see which lines of the perl code in
$WIENROOT/SRC_w2web/bin/w2web throw that error, but I don't
understand enough perl to troubleshoot properly. (I noticed
there's some manipulation of line endings in the preceding
perl lines, but I don't think they're responsible).</div>
</div>
</blockquote>
<br>
No, the problem seems to be somewhere before that. In bin/w2web,
lines 590-600, it seems that change.cgi is executed.<br>
<br>
In lines 614-628, the output is read. According to the HTTP standard
(<a class="moz-txt-link-freetext" href="http://tools.ietf.org/html/rfc2616#section-4">http://tools.ietf.org/html/rfc2616#section-4</a>), this should consist
of Headers, followed by an empty line. w2web parses the header
fields and stops if (a) there are header fields followed by an empty
line or (b) there are no header fields, but two empty lines. Then,
the header fields are checked. In your case, w2web stumbles over a
missing Content-type field (though most likely there are no header
fields at all, or maybe even no message at all).<br>
<br>
The header fields are normally written by the PrintPage function in
libs/w2web.pl. The only reason it might fail (assuming it is called
at all) seems to be if it can't open the HTML template
htdocs/template.html. In all other cases, it should write the
Content-type header, followed by by two new-lines (and followed by
the page of interest).<br>
<br>
PrintPage, in turn, is called at the end of
htdocs/session/change.cgi.<br>
<br>
<br>
My suggestion:<br>
First, put the following line just before the "Missing header" line
in bin/w2web:<br>
while($line = <CGIOUTr>) { &write_data($line); }<br>
That way, you should be able to see what comes out of change.cgi.
Presumably, there is no output (except for the missing header
error).<br>
<br>
Additionally, check if change.cgi is called (e.g., by putting the
line 'PrintPage("Change SID", "OK");' in the beginning, or by
writing something to a log file, or...). If it's not called, there
may be something wrong with the forking. If it is called, there is
some problem in change.cgi that needs to be tracked down in more
detail.<br>
<br>
HTH<br>
Stefan<br>
<br>
<div class="moz-signature">-- <br>
<pre style="margin: inherit;">Stefan Löffler USTEM
Vienna University of Technology T: +43 1 58801-45226
Wiedner Hauptstraße 8-10/E052 / A-1040 Wien F: +43 1 58801-13899
<a href="http://tinyurl.com/njcu47">http://tinyurl.com/njcu47</a> DVR: 0005886
</pre>
</div>
</body>
</html>