]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn
recent event on debconf: ikiwiki bof
[ikiwiki.git] / doc / forum / Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn
1 Hey, trying to get ikiwiki working on my account on a shared webserver. Actually installing ikiwiki on the server is phase 2. For now I'm running the latest ikiwiki (from source) locally, compiling the output with the ikiwiki command, then rsyncing the output dir up to the server. This works for the static HTML files, but the CGI file doesn't work, the server redirects to an error page. The error log on the server says "Premature end of script headers: /path/to/ikiwiki.cgi"
2
3 My first thought was that this is a Perl CGI and I would need to change the shebang to point to the unusual location of Perl on this server, it's at /usr/pkg/bin/perl. But when I looked at ikiwiki.cgi I found it was a binary file.
4
5 Why is it a binary? And what can I do about this error?
6
7 > It's a binary because it's SUID, so that it has permission to write to the ikiwiki repository. See [[security]], under 'suid wrappers', for more on that.
8
9 > As to why you get 'premature end of script headers', that suggests there is a problem running
10 > the script (and there is output occurring before the HTTP headers are printed). Do you have access
11 > to the webserver logs for your host? They might contain some clues. Are you sure that the webserver
12 > is setup for CGI properly? -- [[Jon]]
13
14 > Quite likely your laptop and your server do not run the same
15 > OS, so the wrapper binary cannot just be copied from one
16 > to the other and run. Also, the wrapper is just that, a
17 > thin wrapper which then runs ikiwiki. As ikiwiki is not
18 > yet installed on your server, that's another reason what
19 > you're trying can't work.
20
21 > If installing ikiwiki on the server is not possible or
22 > too much work right now, you could try building your wiki
23 > on your laptop with cgi disabled in the setup file. 
24 > The result would be a static website that you could deploy to
25 > the server this way. Of course, it wouldn't be editable
26 > on the server, and other features that need the CGI would
27 > also be disabled. --[[Joey]]
28
29 > > Ah, ok thanks. Yes the server runs a different OS and ikiwiki
30 > > is not installed on it. I've got it working as a static site,
31 > > so if I want the CGI I'll have to install ikiwiki on the server.
32 > > Ok. It might not work as I don't have root access, but I might
33 > > give it a try. Thanks