[Xitami] URL arg problems
Thomas J. Hruska
xitami@lists.xitami.org
Wed, 08 Aug 2001 00:05:11 -0500
At 03:31 PM 8/7/01 -0700, you wrote:
>"Thomas J. Hruska" wrote:
>
>> If you want to use relative 'Location:' headers like you have above, you
>> will need to use XiFusion as Xitami (latest stable release) does not
>
>Ok, I installed XiFusion, but it still does not work. I can get
>phpinfo() to work, but if I try using an alias and "Location" or an
>alias/menu.php?menu=1&submenu=1, I get:
>Error spawning child process.
>
>Maybe I cannot use aliases?? That would really suck. The log files are
>pretty mute on what went wrong. Running NT SP6.
The message "Error spawning child process" occurs when PHP fails to open
the requested file. PHP will return a non-zero return code, which causes
the error. The log files will show nothing since XiFusion handles everything.
Aliases won't work. That's an issue that I didn't think about during the
design of XiFusion. XiFusion puts your CGI starting point in the webpage
root of Xitami (or whatever DOCUMENT_ROOT is set to) for security reasons.
If you have to bypass XiFusion to get to an alias, use an absolute
"off-site" Location URL:
header("Location:
http://www.mysubserver.myserver.com/alias/menu.php?menu=1&submenu=1");
OR without XiFusion:
header("Location: /alias/menu.php?menu=1&submenu=1");
Both will be passed back to the browser for processing (slower than
server-side processing, but should work). I still recommend using XiFusion
even in your case as you will probably not hop all over the place too
often. If you will be using Aliases more often than not, then don't use
XiFusion.
The first Location URL is viewed by XiFusion to be an "off-site" absolute
URL. For these types of URLs, XiFusion will pass the Location back to the
server and the server will pass them back to the client to process. The
second Location URL is viewed by XiFusion as an absolute URL on the current
server and will do server-side redirection without regard to Aliases.
Without XiFusion, the second method is passed back to the browser which
will then contact Xitami. Remember, Xitami knows about Aliases, XiFusion
does not. Also note that Aliases generally take more time to process.
Hope this helps!
Thomas J. Hruska -- shinelight@crosswinds.net
Shining Light Productions -- "Meeting the needs of fellow programmers"
http://www.shininglightpro.com/