win shell CGI - debugging technique

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
lazna
-


Joined: 16 Aug 2015
Posts: 52

PostPosted: Wed Aug 10, 2016 9:58 am    Post subject: win shell CGI - debugging technique Reply with quote

Using win shell as a CGI, time-by-time need to start shell script from cmd line due to debugging. Need to distinguish if script is started by WEB server CGI engine or not. Have idea to check if variable %REMOTE_ADDR% is empty or not. Is it reliable solution? Are there any better ways?

L.
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Fri Oct 07, 2016 12:55 pm    Post subject: Re: win shell CGI - debugging technique Reply with quote

lazna,

Checking for env variable GATEWAY_INTERFACE to be set to CGI/1.1 is the way to go. Actually that's how PHP and many CGI/CLI tools do to distinguish the requested mode of operation.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group