summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-08-16 12:47:56 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-08-16 12:47:56 +0000
commitf11c3a409558f6159d88b5c876976064f51fc469 (patch)
tree3cf70b846fc8399e4d79f6d311affc0a0a0c9a89
parent2e4b6ef181934b893001723f3cbec091d23e9bbd (diff)
downloadphp-git-f11c3a409558f6159d88b5c876976064f51fc469.tar.gz
Added a handler for php -r '' for SAFE_MODE
-rw-r--r--ext/standard/pageinfo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index e1ea9c54f2..13d500bef7 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -35,6 +35,7 @@
#include <unistd.h>
#endif
#include <sys/stat.h>
+#include <sys/types.h>
#ifdef PHP_WIN32
#include <process.h>
#endif
@@ -56,6 +57,10 @@ PHPAPI void php_statpage(TSRMLS_D)
BG(page_inode) = pstat->st_ino;
BG(page_mtime) = pstat->st_mtime;
}
+ else { /* handler for situations where there is no source file, ex. php -r */
+ BG(page_uid) = getuid();
+ BG(page_gid) = getgid();
+ }
}
}
/* }}} */