[Xitami] Xitami with php>4.3.0?
Elliott Potter
xitami@lists.xitami.org
Fri, 21 May 2004 23:50:47 -0500 (EST)
I've been trying for some time now to get Xitami-<any version> to work
with a php version newer than 4.3.0 -- "out of the box" I get the error
message "No input file specified" if I try to view a .php page.
I looked around a bit and discovered that the newer versions of PHP
require the CGI environment variable SCRIPT_FILENAME, and will not use
the variable SCRIPT_NAME as in the past.
(Search the page http://us4.php.net/features.commandline for
SCRIPT_FILENAME for some more details)
I checked three versions of xitami (2.4d9, 2.4d10, 2.5<latest>) and none
of them appear export the SCRIPT_FILENAME variable. I tried some other
solutions that people had suggested on the web, such as setting
doc_root, cgi.force_redirect, cgi.fix_pathinfo, and/or include_path in
php.ini ... no luck.
Does anyone have any comments on this? Is anyone using Xitami with a
relatively new version of php? I'd like to think that I'm just missing
some painfully obvious thing, but no snakes have jumped out and bitten
me yet :)
In the meantime, I've come up with the following patch for xitami-2.4d9
which appears to work, but is probably not a good way of going about it:
--- src/smt/old.smthttpl.c 2004-05-21 23:36:42.000000000 -0500
+++ src/smt/smthttpl.c 2004-05-21 23:36:23.000000000 -0500
@@ -2787,6 +2787,7 @@
SET ("Request-Method", http_methods [p_http-> method]);
SET ("Script-Path", p_http-> script_path);
SET ("Script-Name", p_http-> script_name);
+ SET ("Script-Filename", path_translated);
SET ("Content-Type", http_header_value (p_http, "content-type"));
SET ("Content-Length", http_header_value (p_http, "content-length"));
SET ("Remote-User", p_http-> username? p_http-> username: "-");
... all I did was add the Script-Filename variable to the list; I used
path_translated because that appears to give the output I need (the full
path of whatever php file is being served).
Comments? Suggestions? Barring any better advice, I'm just going to
keep using this, because I'm very happy with Xitami otherwise, and don't
want to go about the baffling ordeal of choosing another web server.
Thanks as usual
--
Elliott