iliaa Mon Sep 23 14:51:34 2002 EDT
Modified files:
/php4/sapi/apache2filter php_apache.h sapi_apache2.c
Log:
Fixed bug #17466
Index: php4/sapi/apache2filter/php_apache.h
diff -u php4/sapi/apache2filter/php_apache.h:1.15
php4/sapi/apache2filter/php_apache.h:1.16
--- php4/sapi/apache2filter/php_apache.h:1.15 Fri Sep 20 21:53:15 2002
+++ php4/sapi/apache2filter/php_apache.h Mon Sep 23 14:51:34 2002
@@ -38,6 +38,8 @@
int post_len;
/* Index for reading from buffer */
int post_idx;
+ /* stat structure of the current file */
+ struct stat finfo;
/* Buffer for request body filter */
char *post_data;
/* Whether or not we've processed PHP in the output filters yet. */
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.84
php4/sapi/apache2filter/sapi_apache2.c:1.85
--- php4/sapi/apache2filter/sapi_apache2.c:1.84 Mon Sep 23 00:10:25 2002
+++ php4/sapi/apache2filter/sapi_apache2.c Mon Sep 23 14:51:34 2002
@@ -149,6 +149,23 @@
return n;
}
+static struct stat*
+php_apache_sapi_get_stat(TSRMLS_D)
+{
+ php_struct *ctx = SG(server_context);
+
+ ctx->finfo.st_uid = ctx->r->finfo.user;
+ ctx->finfo.st_gid = ctx->r->finfo.group;
+ ctx->finfo.st_ino = ctx->r->finfo.inode;
+ ctx->finfo.st_atime = ctx->r->finfo.atime/1000000;
+ ctx->finfo.st_mtime = ctx->r->finfo.mtime/1000000;
+ ctx->finfo.st_ctime = ctx->r->finfo.ctime/1000000;
+ ctx->finfo.st_size = ctx->r->finfo.size;
+ ctx->finfo.st_nlink = ctx->r->finfo.nlink;
+
+ return &ctx->finfo;
+}
+
static char *
php_apache_sapi_read_cookies(TSRMLS_D)
{
@@ -264,7 +281,7 @@
php_apache_sapi_ub_write, /* unbuffered write */
php_apache_sapi_flush, /* flush */
- NULL, /* get
uid */
+ php_apache_sapi_get_stat, /* get
+uid */
php_apache_sapi_getenv, /* getenv */
php_error, /*
error handler */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php