View previous topic :: View next topic |
Author |
Message |
zhao -
Joined: 18 Jun 2003 Posts: 2
|
Posted: Wed Jun 18, 2003 4:05 am Post subject: SSI Error in directive exec in line 38: Internal Server Erro |
|
|
Hi..
Got the same dummy questions.. the CGI / perl doesn't work
Yes, I have already read and followed the instructions on
http://www.aprelium.com/abyssws/perl.html
installed the perl
at c:\perl\bin\perl.exe
added the following line to index.html (renamed to x.shtml)
<!--#exec cgi="/cgi-bin/count.pl"--> visits..
and my count.pl is
#******** BEGIN BODY ********
open (GETCOUNT,"<count.log"); #open count log for input
$counter=<GETCOUNT>; #assign contents of file to $counter
close (GETCOUNT); #close access to file
$counter++; #increase $counter by 1.
print "$counter hits"; #print number of hits to users screen
open (PUTCOUNT,">count.log"); #open count log for output
print PUTCOUNT ($counter); #replace old counter value with new one
close PUTCOUNT; # close access to file
#******** END BODY *********
still got error..
Any suggestion?
Thanks, |
|
Back to top |
|
|
zhao -
Joined: 18 Jun 2003 Posts: 2
|
Posted: Wed Jun 18, 2003 4:07 am Post subject: |
|
|
by the way. the error msg is
[SSI Error in directive exec in line 38: Internal Server Error] visits |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jun 19, 2003 2:41 pm Post subject: |
|
|
zhao wrote: | by the way. the error msg is
[SSI Error in directive exec in line 38: Internal Server Error] visits |
You get "Internal Server error" because your script is not conforming to the CGI specification. In fact it does not output the header lines required by CGI. That's why it cannot be considered as a CGI script and that's why the server complaints.
The solution is to insert as the first line of the script:
Code: |
print "Status: 200 OK\n\n";
|
to transform it into a valid CGI script. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
pluckydsheep -
Joined: 10 Sep 2003 Posts: 4 Location: Kansas
|
Posted: Thu May 13, 2004 9:00 pm Post subject: Same problem... |
|
|
I had the same problem, but your solution outputs the following on the html page:
Error 200
OK
--------------------------------------------------------------------------------
Abyss Web Server X1
© Aprelium Technologies - 2001-2004
Is there a way around this, or is every page with SSI going to have this header? |
|
Back to top |
|
|
pluckydsheep -
Joined: 10 Sep 2003 Posts: 4 Location: Kansas
|
Posted: Thu May 13, 2004 11:39 pm Post subject: Solved my own problem (alternate solution) |
|
|
The CGI file included with SSI must output valid HTML content -- hence, the internal server error. My script didn't output anything. I wrote the following line on line 1 of the included script:
print "Content-type: text/html\015\012\015\012\n\n";
Since this outputs valid HTML, but doesn't output any characters, it doesn't write text to the page and satisfies the requirements for the #exec command. I've been wondering about this for a long time -- hope it helps somebody else. |
|
Back to top |
|
|
sdigest -
Joined: 28 Jun 2004 Posts: 1
|
Posted: Mon Jun 28, 2004 9:11 pm Post subject: |
|
|
I just read a few of the posts and i may have missed it somewheres but where do we find the config file for this surver so we can use SSI and Can we use it. Can you give me some more info about it. |
|
Back to top |
|
|
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jun 29, 2004 3:52 pm Post subject: |
|
|
sdigest,
You can configure SSI parameters in the console (the config file is for the machine, the console is for humans.) There is also a full chapter about SSI in the user's manual of Abyss Web Server. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|