alexwaugh Tue Mar 7 22:34:37 2006 UTC
Modified files:
/php-src/sapi/webjames webjames.c
Log:
Improve DOCUMENT_ROOT setting
http://cvs.php.net/viewcvs.cgi/php-src/sapi/webjames/webjames.c?r1=1.12&r2=1.13&diff_format=u
Index: php-src/sapi/webjames/webjames.c
diff -u php-src/sapi/webjames/webjames.c:1.12
php-src/sapi/webjames/webjames.c:1.13
--- php-src/sapi/webjames/webjames.c:1.12 Sun Jan 1 13:09:58 2006
+++ php-src/sapi/webjames/webjames.c Tue Mar 7 22:34:37 2006
@@ -27,7 +27,7 @@
#include <unixlib/local.h>
-#define WEBJAMES_SAPI_VERSION "1.0.0"
+#define WEBJAMES_SAPI_VERSION "1.0.1"
typedef struct {
struct connection *conn; /*structure holding all the details of the
current request*/
@@ -96,6 +96,7 @@
static void sapi_webjames_register_variables(zval *track_vars_array TSRMLS_DC)
{
char buf[BUF_SIZE + 1];
+ char *docroot;
buf[BUF_SIZE] = '\0';
@@ -105,7 +106,9 @@
ADD_NUM("SERVER_PORT", port);
ADD_STRING("SERVER_ADMIN",configuration.webmaster);
ADD_STRING("GATEWAY_INTERFACE", "CGI/1.1");
- ADD_STRING("DOCUMENT_ROOT", configuration.site);
+
+ docroot = __unixify(WG(conn)->homedir,0,NULL,1024,0);
+ if (docroot) ADD_STRING("DOCUMENT_ROOT", docroot);
ADD_FIELD("REQUEST_METHOD", methodstr);
ADD_FIELD("REQUEST_URI", requesturi);
@@ -147,7 +150,7 @@
char *path;
/* Convert filename to Unix format*/
- __riscosify_control|=__RISCOSIFY_DONT_CHECK_DIR;
+ __riscosify_control|=__RISCOSIFY_STRICT_UNIX_SPECS;
path = __unixify(WG(conn)->filename,0,NULL,1024,0);
if (path) SG(request_info).path_translated = estrdup(path);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php