Gossamer Forum
Home : General : Perl Programming :

Problem using SSI

Quote Reply
Problem using SSI
Here is my problem when i execute the perl script manually by typing in the url it returns the number 77 like it should. When i use the SSI:

#exec cgi="/cgi-bin/BDLOGGER.PL" it returns:

HTTP/1.1 200 OK Date: Sat, 04 Aug 2001 23:23:12 GMT Server: Microsoft-IIS/5.0 Content-type: text/html 77

What am i doing wrong?



Quote Reply
Re: Problem using SSI In reply to
You need to remove the CONTENT/TYPE headers if you are going to use the script in a SSI generated web page.

Regards,

Eliot Lee Wink
http://anthrotech.com/
Quote Reply
Re: Problem using SSI In reply to
Ok i just did that and now nothing from that script is displayed on the page. Have you seen this before? I dont get it!!! When i leave the content type headers in there it displays all that server info, and at the very end of the info it does display the number! So i dont get what all this other stuff is.

Maybe there is a way use javascript and save this as a string and pull out only the last number? I dont know how to do this but it might work.
Quote Reply
Re: Problem using SSI In reply to
Can you post the part of the code that prints the header and the part that prints desired output of your script? If the script is short, post it all. It will be much easier for someone to help if they can see the code.

Regards,
Charlie

Quote Reply
Re: Problem using SSI In reply to
I did not write the code and its full of comments that make it very long, so here is a link to download it off my server: http://128.242.72.194/downloads/bdlog21.zip any help or suggestions would be greatly appreciated

Quote Reply
Re: Problem using SSI In reply to
I tested it out and it works fine for me as long as I print the header. If I remove the header, I get nothing. I testing on apache though. It looks like you are running it on IIS. You might want to check with your host and see if there is anything special you need to do for server side includes to display properly. One thing you might want to try real fast is change the third line to a plain text header like:

print "Content-type: text/plain\n\n";

instead of:

print "Content-type: text/html\n\n";

Maybe someone else around here knows more about SSI on an IIS server than I do and can jump in.

Regards,
Charlie

Quote Reply
Re: Problem using SSI In reply to
I thank you for your quick response. However it still does the same thing! So i am thinking this must be a IIS Server issue. Anyone have any ideas.

Quote Reply
Re: Problem using SSI In reply to
I couldn't get the #exec command to work at all on IIS 5.

I just gave up and ended up using a scheduled task and an include (which worked fine and even better in my situation)

I didn't get an error, it just wouldn't interpret it.

Just my two cents.

Quote Reply
Re: Problem using SSI In reply to
Well i do need some money so i do thank you for your 2 cents. J/K Thanks for trying, this problem is really driving me nuts!