php 5.2.15 open_basedir restriction error
php 5.2.15 bug open_basedir restriction
详细情况可以看官方网 http://bugs.php.net/bug.php?id=53516
把patch 文件上传到
diff -ruN php-5.2.15/main/fopen_wrappers.c php-5.2.15.ofi/main/fopen_wrappers.c
--- php-5.2.15/main/fopen_wrappers.c 2010-12-09 18:04:29.000000000 +0100
+++ php-5.2.15.ofi/main/fopen_wrappers.c 2010-12-10 11:32:02.000000000 +0100
@@ -192,7 +192,7 @@
if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
#endif
if (resolved_name_len > resolved_basedir_len &&
- resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) {
+ resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
return -1;
} else {
/* File is in the right directory */
ssh 服务器, patch -p0 < open_basedir.patch 即可
在编译安装php, php 5.2.15 就可以支持open_basedir 了
下一篇: dedecms 评论功能完善与修改
