• Partially fixed...

    From Sean Dennis@1:18/200 to All on Monday, November 14, 2005 15:43:42
    Hi, everyone.

    After tinkering a bit, I discovered the real problem-evidently Telegard resets the caller file at the beginning of each day, so there's not always 10 callers when the program's run. By modifying the code a bit, that error disappeared (although I know it certainly can't hurt locking the file being read in read-only mode).

    I have another question: this CGI reads in a config file. However, I can't figure out how to get the CGI to read the file without hardcoding the location into the actual program itself. I don't want to pass this on the command line when the CGI is called. Does anyone know a way around this?

    Thanks,
    Sean

    // hausmaus@darktech.org | http://outpostbbs.net | ICQ: 19965647

    --- Telegard/2 v3.09.g2-sp4/mL
    * Origin: Outpost BBS - outpostbbs.darktech.org (1:18/200)
  • From Michael Preslar@1:275/112 to Sean Dennis on Tuesday, November 15, 2005 12:33:48
    Re: Partially fixed...
    By: Sean Dennis to All on Mon Nov 14 2005 03:43 pm

    I have another question: this CGI reads in a config file. However, I can't figure out how to get the CGI to read the file without hardcoding the locati into the actual program itself. I don't want to pass this on the command li when the CGI is called. Does anyone know a way around this?

    Try

    var s:string;

    s := getenv('SCRIPT_FILENAME');

    {$ifdef FORNIX<curly bracket. my telnet client doesnt like em>

    while s[length(s) <> '/' do delete(s,length(s),1);


    {else<curly>

    while s[length(s) <> '\' do delete(s,length(s),1);

    {$endif<curly>

    s := s + 'config.cfg';

    Email me and Ill show you a cgi that shows all of the useful environment variables available to cgis.
    --- SBBSecho 2.10-Win32
    * Origin: mount_z.synchro.net - Home of Lord/* (1:275/112)