summaryrefslogtreecommitdiff
diff options
context:
space:
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();
+ }
}
}
/* }}} */