in reply to Re: Passing a query string from a command line (Win32)
in thread Passing a query string from a command line (Win32)

My script does use cgi but when it is run from the command line it returns different results than if run from a browser. Is there a way to trick a script to think that is was run from a browser? How does Apache or other web servers open the script and get results? What do they do different? Aren't they reading from STDOUT also? Isn't there a way to simulate a web server to get the 'web' results of a single script?
  • Comment on Re^2: Passing a query string from a command line (Win32)

Replies are listed 'Best First'.
Re^3: Passing a query string from a command line (Win32)
by BrowserUk (Patriarch) on Oct 29, 2005 at 18:09 UTC

    If you find downloading, setting up and maintaining Apache is daunting, or like me, just a pain in the artic, take a look here.

    70k to download, setup consists of 2 options and it does most of what apache does.

    Probably not good for running your multinational conglomorate, but for testing your scripts at home...


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: Passing a query string from a command line (Win32)
by wfsp (Abbot) on Oct 29, 2005 at 15:49 UTC
    Hi slloyd,

    When I was in your position I installed Apache. Why try to simulate one when you can have the real thing?

    Hope that helps