<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Stefan,</div><div><br></div><div>Thanks very much for taking the time to write such a detailed reply. I appreciate it very much. </div><div><br></div><div>I've indeed tested the lines coming back from CGIoutr and they're empty as you suspected. The html headers simply aren't being written. </div><div><br></div><div>My own guess was slightly different -- that when I type <a href="http://local">http://local</a> host:7890 w2web opens index.pl (as it is programmed to look for index files when you point it to a directory, in this case the root directory htdocs) - and index.pl points to change.cgi through redurectURL (in lib/w2web). My hypothesis has been that redirectURL ought to write the header lines, and it's not happening for some reason. I had ignored PrintPage - I assumed it only prints content? - but it seems that according to you, this also prints a header? I'll look at the problem again using the pointers you've provided and let you know of any updates. </div><div><br></div><div>Note that some of the pages execute fine, e.g. Surfing to <a href="http://localhost:7890/session/new.cgiworks">http://localhost:7890/session/new.cgiworks</a> fine (or is it new.pl? I forget) and by being clever I can do some of the w2web tasks, but too many don't execute right (change session, execute program ...)</div><div><br></div><div>I've tried running the server through Komodo to do step by step debugging but again my primitive knowledge of perl/cgi prevents me from succeeding. </div><div><br></div><div>My 2 Mac machines have a similar software configuration, so if anyone with a Mac can confirm it's working for them, that would be very valuable. </div><div><br></div><div>(I'm also failing so far to compile wien2k-13/lapw0 correctly on Mac, but that will be for a new discussion.)</div><div><br></div><div><br></div><div>Cheers</div><div><br></div><div><br></div><div>Kevin</div><div><br></div><div><br>On Aug 12, 2014, at 6:55 AM, Stefan Löffler <<a href="mailto:stefan.loeffler@tuwien.ac.at">stefan.loeffler@tuwien.ac.at</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<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>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Wien mailing list</span><br><span><a href="mailto:Wien@zeus.theochem.tuwien.ac.at">Wien@zeus.theochem.tuwien.ac.at</a></span><br><span><a href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a></span><br><span>SEARCH the MAILING-LIST at: <a href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a></span><br></div></blockquote></body></html>