Thread: SSI Question

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    TX
    Posts
    38
    Rep Power
    15
    I am trying to use SSI (for the first time)
    to display the contents of a file within an html form. For ex: a user views the form
    and the current date is already filled in for them ( I know how to do that: <!--#config timefmt="%Y-%m-%d" --> <!--#echo var="DATE_LOCAL" --> )

    I want to display the contents of my counter file within the job id field the user fills out. I tried : "<!--#echo var="../cgi-bin/data/counter.pl" -->" but it doesn't work.

    The main goal is to give the user a predefined job number and I was using the counter to do that but it's not working..any suggestions?
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    you can insert the output of a script with :

    <!--#include virtual="scriptname.ext" -->
  4. #3
  5. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Yes, use <!--#include virtual="scriptname.ext" -->

    >>"<!--#echo var="../cgi-bin/data/counter.pl" -->" but it doesn't work

    Two mistakes here. First, you can't use echo var for that. Second, you can't use "../", that is for security reason and it's how SSI supposed to work. Please note, you also can't include up 1 directory level. To do that, you have to use "exec cmd" with full path.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    TX
    Posts
    38
    Rep Power
    15
    Thanks!

    I tried that and received the following error.. any ideas why??

    [Can't write to the data file! Counter not incremented!]8
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    TX
    Posts
    38
    Rep Power
    15
    Nevermind, I got it to work..my brain must think it's Monday :-). Thanks again!
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    I have tried to use the include virtual ssi but it displays all of the coding for the cgi file instead of executing it. i am also trying to pass a parameter and it says it can't find the .html file that the script looks for as a template file. I have run this script using exec cgi on a different server but me new ISP won't run this ssi command. Any suggestions on what the problem might be?

IMN logo majestic logo threadwatch logo seochat tools logo