SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    ********* Addict
    Join Date
    Jan 2000
    Location
    New York
    Posts
    208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello, everyone.
    A few days ago, I installed a CGI script called Award-It. I want to blend it into my design and to make that effect I decided to use SSI... now the thing is I don't know how to make .cgi extension to support SSI. I can't really type in the whole page because the file would become really huge...

    What am I supposed to do? Is there a similar command that allows SSI in CGI?
    Thank You
    Boris

    ------------------

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You would have to modify one script to call the other one and send the data out in the page stream. You don't need to use SSI because your already at the server.

    ------------------
    Wayne Luke

    The Majormud Encyclopedia - www.bloodquest2.com
    Come Play one of the hottest games on the net.



  3. #3
    ********* Addict
    Join Date
    Jan 2000
    Location
    New York
    Posts
    208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what you mean...

  4. #4
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just print the content type
    "text/x-server-parsed-html" instead of
    "text/html". That should do the trick...
    just be sure to filter out HTML tags from input, otherwise people could execute arbritrary SSI calls on your system

  5. #5
    ********* Addict
    Join Date
    Jan 2000
    Location
    New York
    Posts
    208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    I followed your advice but it doesn't seem to work: see for yourself http://echodev.com/cgi-bin/award-it/award-it-1.00.cgi

    also, I don't know how to "filter" out the HTML tags...

    Thanks
    Boris

  6. #6
    Destiny Manager Plebius's Avatar
    Join Date
    Nov 1999
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... I guess your server must not be configured to let you do that. It works on mine, and on other apache servers i have used. It's kind of an old way of doing it, so maybe your server lacks backwards compatibility.

    Just replace all < and > tags with < and > using something lik ethis
    $input =~ s/>/>/g;
    $input =~ s/</</g;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •