[Wien] Does w2web work on Mac OS X?
Stefan Löffler
stefan.loeffler at tuwien.ac.at
Tue Aug 12 15:55:48 CEST 2014
Hi,
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.
Am 2014-08-08 um 07:47 schrieb Kevin Jorissen:
> 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.
>
> 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).
No, the problem seems to be somewhere before that. In bin/w2web, lines
590-600, it seems that change.cgi is executed.
In lines 614-628, the output is read. According to the HTTP standard
(http://tools.ietf.org/html/rfc2616#section-4), 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).
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).
PrintPage, in turn, is called at the end of htdocs/session/change.cgi.
My suggestion:
First, put the following line just before the "Missing header" line in
bin/w2web:
while($line = <CGIOUTr>) { &write_data($line); }
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).
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.
HTH
Stefan
--
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
http://tinyurl.com/njcu47 DVR: 0005886
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20140812/a799c15e/attachment.htm>
More information about the Wien
mailing list