Raymond Koverzin wrote: <snip>
I can't, however, execute a cgi program. All I get displayed is a blank page; which (when I look at the page source) shows the header <title>stuff</title> and a body with no stuff.
I suspect the problem is related to the chroot in my thttpd.conf file but I've tried both chroot and nochroot and still do not have it working. These are the things I've done:
<snip>
5. I've created a simple .c program that just does a printf( "I'm here.\n"), compiled it with flags -march=i486 and -static and put it in the cgi-bin directory. It has no loadable modules so it should not care where chroot is pointing. I still get the same problem.
Okay, I'm crying "Uncle!" right now. What am I missing? Why would the 'ssi' executable run but my statically linked app does not?
Um...not to be rude or anything, but have you actually tried writing a CGI program, or are you testing with just the one-line output of the above printf?
CGI programs are expected to provide a content-type header (and any other extra headers) followed by a blank line, prior to the actual data. See, for example, the simple shell-based CGI below:
cat <<- /DATA Content-type: text/plain
Hello world! /DATA
I suggest you read through some CGI documentation...the following is a good place to start:
http://hoohoo.ncsa.uiuc.edu/cgi/overview.html
And particularly: http://hoohoo.ncsa.uiuc.edu/cgi/primer.html
If you don't output headers, a blank line, and then your actual data, the web-server will generally assume your CGI program crashed, and what gets back to the client (if anything) is server dependent.
-- Charles Steinkuehler [EMAIL PROTECTED]
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
