SSI Error in directive exec in line 38: Internal Server Erro

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
zhao
-


Joined: 18 Jun 2003
Posts: 2

PostPosted: Wed Jun 18, 2003 4:05 am    Post subject: SSI Error in directive exec in line 38: Internal Server Erro Reply with quote

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 View user's profile Send private message
zhao
-


Joined: 18 Jun 2003
Posts: 2

PostPosted: Wed Jun 18, 2003 4:07 am    Post subject: Reply with quote

by the way. the error msg is

[SSI Error in directive exec in line 38: Internal Server Error] visits
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Jun 19, 2003 2:41 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
pluckydsheep
-


Joined: 10 Sep 2003
Posts: 4
Location: Kansas

PostPosted: Thu May 13, 2004 9:00 pm    Post subject: Same problem... Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
pluckydsheep
-


Joined: 10 Sep 2003
Posts: 4
Location: Kansas

PostPosted: Thu May 13, 2004 11:39 pm    Post subject: Solved my own problem (alternate solution) Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sdigest
-


Joined: 28 Jun 2004
Posts: 1

PostPosted: Mon Jun 28, 2004 9:11 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Mon Jun 28, 2004 9:20 pm    Post subject: Reply with quote

You use the admin console for all server configuration.

http://www.aprelium.com/data/abyssws-x1-win-doc-html/console.html
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jun 29, 2004 3:52 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group