[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Want to watch the fun with the Code Red and it's new variant?



>I have done this but it just shows me the raw data:
>
>If I run it from a telnet session, it works fine and just shows the data with all the html tags. I am running IE and Netscape on a Mac, if this makes a differrence.


Jason,

see my post *just* prior to this one - your problem is *almost* certainly that your VERY first line isn't the same as I posted:

#!/bin/sh

You can NOT have any blank lines BEFORE this in the script - ie, the very first character of the script should be the hash '#' of the comment line.

This tells the shell interpreter which binary to interpret the script with - eg, most perl scripts have the line #!/usr/bin/perl

If this *DOESN'T* work, then you should add THREE empty lines in the first echo command (the content-type echo) ABOVE the lines:

<H1>Getting Code Red Data...</H1>


and *AFTER* the line:

echo "content-type: text/html


so that whole section would read:

echo "content-type: text/html



<H1>Getting Code Red Data...</H1>
"

Some time the apache configuration/browser combination might not recognise the output as HTML, and it will get interpreted as the default (probalby raw text) - so this MIGHT explain why you got back the output from the script as opposed to HTML.

<GREG SHOOTS HIS OWN FOOT>
I posted a few posts back about "not being explicit is the mother of all coding screwups"?  THAT could be an example of how I didn't cover all my bases - I *KNOW* that I need 2-3 empty lines after the content-type header - I also left them out because I knew I could get away with it on my RAQ - yours might be more finicky. 
</GREG SHOOTS HIS OWN FOOT>

If after trying BOTH of the above, you are still having problems, drop me a line off group and I'll take a look at it for you.

regards

Greg

ps - I run a mac with ie and Netscrape too - the script works on my browsers and RAQ3...


>
>Jason
>
>>" rm coderedlock.txt exit 0
>>On Thu, 9 Aug 2001 12:29:14 -0700, Jim Scott mumbled something like:
>>>>When I used it with a CGI extension it did not work. I just removed
>>>>the CGI
>>>>extension from the name and called it again from the CGI directory
>>>>and it
>>>>worked.
>>
>>That's because it's not a CGI script, it's a shell script - running
>>it through the cgi wrapper was causing the error.
>>Sorry I didn't see this one earlier or would've suggested taking the
>>extention off, still replying though because I thought you might like
>>to know *why* taking the name off made it work.
>>--
>>CarrieB
>"Microsoft is no file:
>>t the answer, Microsoft is the question. NO is the
>>answer." --Unknown
>>
>>
>>_______________________________________________
>>cobalt-users mailing list
>>cobalt-users@xxxxxxxxxxxxxxx
>>To Subscribe or Unsubscribe, please go to:
>>http://list.cobalt.com/mailman/listinfo/cobalt-users
>
>--
> ---------------------------------------------
>Webmaster
>       Netergy.com Limited
>       Studio 1B, 101 Farm Lane, London SW6 1QJ
>       T: 020 7610 1010 - F: 020 7610 1551
>       http://www.netergy.com
>       http://www.anynames.com
> ---------------------------------------------
>
> IMPORTANT LEGAL NOTICE:
> This e-mail is strictly confidential and is intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this communication in error, please advise us by e-mail and delete the file from your system.
>
> If you contact us by e-mail, we will store your name and address to facilitate communications.
>_______________________________________________
>cobalt-users mailing list
>cobalt-users@xxxxxxxxxxxxxxx
>To Subscribe or Unsubscribe, please go to:
>http://list.cobalt.com/mailman/listinfo/cobalt-users

-- 
http://www.webyourbusiness.com/
Providers of E-Commerce Software &
Web Design Consultancy and Services.
PH: (970)266-0195 FAX: (970)266-0158