* Michiel Boland <[EMAIL PROTECTED]> [2005-01-24 17:50 +0100]: > >Thanks, it works wonderfully now! Question, though: Why should it use > >SCRIPT_NAME instead of PATH_INFO? Or, I guess, what was the purpose of > >PATH_INFO, why did SCRIPT_NAME take over, and where can I read more > >about that? > > I believe the story is roughly as follows. The CGI standard [1] > dictates that if you have a script, say, /cgi-bin/php, then anything > in the URL following that script is passed as PATH_INFO.
Ok, that makes sense. > Now, the CGI standard was written at a time when the only CGI scripts > were of the form described above, where you had a dedicated directory > for scripts. This directory was mapped to a URL using ScriptAlias, or > whatever directive ncsa/cern/etc used. > > Today the /cgi-bin nonsense has mostly disappeared I think; nowadays > scripts are put in the same directory as viewable content, so one > would have just > > /hello-world.php > > instead of > > /cgi-bin/php/hello-world.php > > Now to make hello-world.php work the same one would set PATH_INFO to > /hello-world.php in both instances. IIS did this, so I copied that > behaviour. But it sort-of clashes with the CGI specification. Since > mathopd 1.5 is the first version that claims to support CGI properly I > decided to back this out. Also, apache does it this way, and by then I > no longer had anything to do with IIS. :) > > Hope this makes any sense. Ok, took a while to digest all this, and do some searching of my own. I found two good references, one off of the site you provided [1], and one I found on my own [2]. They both describe PATH_INFO and SCRIPT_NAME in approximately the same way, but I guess I'm confused as to how the script gets the follow-on path information. In example, for the following URL: http://weller-fahy.com/bleah/not/here.html Where the script 'index.php' is in /usr/local/www which is mapped to /. By your description PATH_INFO was used to set the virtual path to the script, not the follow on path information to be processed by the script, correct? In that case, especially now that SCRIPT_NAME contains the virtual path to the script, and PATH_INFO isn't used, how the heck is the script getting the followon path information? :? Regards, -- dave [ please don't CC me ]
