Author Topic: delete post please  (Read 10492 times)

RONB

  • Guest
delete post please
« on: October 20, 2011, 12:18:02 PM »
info not helpful to others, please delete post, thanks
« Last Edit: March 03, 2013, 07:58:48 PM by RONB »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: cgi module
« Reply #1 on: October 20, 2011, 02:38:24 PM »
Ron,

I normally set environment variables with the SYSTEM or EXECUTE SB command. Are you starting your CGI scripts using the scriba -c command to tell SB that the script is CGI based?

Quote
CGI programs gain a great wealth of information from environment variables. This data is available to the ScriptBasic program via module functions. The CGI program is encouraged to use these functions instead of the function environ(). The reason to use these functions is that later versions of the CGI module may support ISAPI, NSAPI, FastCGI and other web server interface modes. Calling the function environ() to get the value of these variables will not work in that case, while calling the functions provided by the CGI module still works.

John

Update

Quote
.htaccess files are reread upon every hit within that directory. In fact, the web server will look for these .htaccess files on every access to the web server.

If using Apache, you may be able to set your environment variable by creating a .htaccess file in the directory your script is running and add the following.

SetEnv HTMLDOC_NOCGI "1"

« Last Edit: October 20, 2011, 04:39:05 PM by support »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: cgi module
« Reply #2 on: October 20, 2011, 09:39:23 PM »
After my previous post I gave the .htaccess method a try and it worked fine. That should be a quick way to solve your issue.

In general, how are your adventures going with ScriptBasic?


Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: cgi module
« Reply #3 on: October 21, 2011, 06:45:58 AM »
Another way to set CGI environment variables is to specify them as either GET or as POST parameters in the http request.
« Last Edit: October 21, 2011, 06:53:36 AM by support »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: cgi module
« Reply #4 on: October 21, 2011, 06:36:12 PM »
Ron,

I'm trying to understand what you're after. I assumed that you're sending  a request to a non-SB page/script that is looking for a special environmental variable to be set. Can you be more specific what you're trying to accomplish?

John

P.S.

Thanks for your feedback about SB.