无法将旧的joombla迁移到另一个服务器,因为php无法读取配置文件。:S
出于测试原因,我编写了以下代码:
clearstatcache();
echo substr(sprintf('%o', fileperms('configuration2.php')), -4);
if(file_get_contents("configuration.php")) echo " trae conent";
else echo " no trae un joraca ";
if (is_readable('configuration.php')) {
echo 'The file is readable';
} else {
echo ' NOOOOO ';
}
readfile('configuration2.php');
exit();返回:
0no trae un joraca NOOOOO
ls:
-rwxrwxrwx 1 www-data www-data 2189 jun 14 18:16 configuration.php
apache2运行为www-data:www-data
数据10194 0.0 0.1 25940 3336?S 19:19 0:00 /usr/sbin/apache2 -k start
.htaccess删除
为什么文件不可读?我已经检查了.htaccess、chmod和chown的问题。
发布于 2020-04-26 20:25:45
我发现了这个:
[Sun Jun 12 22:12:12 2016] [warn] [client 1---1] mod_fcgid: stderr: PHP Warning: file_exists(): open_basedir restriction in effect. File(configuration.php) is not within the allowed path(s): (/var/ww---/web:/var/w---0/web20/tmp:/var/www/inm--ne.com/web是什么解释了错误:D
https://stackoverflow.com/questions/37823405
复制相似问题