困扰多天的PHP+XOOPS的安装问题,未解决

cutemouse 2006-08-19 11:32:21
我在LINUX下,已经安装了APACHE+MYSQL+PHP
在HTTPD.CONF文件下设置了以下路径:
Alias /web/ "/opt/xoops-2.0.14/htdocs/"

Options All MultiViews
AllowOverride None
Order allow,deny
Allow from all

DocumentRoot "/var/www/html"

Options FollowSymLinks
AllowOverride None


"uploads/", "cache/", "templates_c/", "mainfile.php"
目录都设置了777和666属性
但是无论怎么改,安装XOOPS的过程中还是出现如下的错误:
http://127.0.0.1/web/install/index.php

Checking file and directory permissions..
Directory uploads/ is NOT writable.
Directory cache/ is NOT writable.
Directory templates_c/ is NOT writable.
File mainfile.php is NOT writable.


In order for the modules included in the package to work correctly, the following files must be writeable by the server. Please change the permission setting for these files. (i.e. 'chmod 666 file_name' and 'chmod 777 dir_name' on a UNIX/LINUX server, or check the properties of the file and make sure the read-only flag is not set on a Windows server)

老提示权限不够。到底哪里出了错误?
...全文
271 6 打赏 收藏 举报
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
skyx 2006-09-11
首先你要确定一下你的操作系统,不同操作系统的保护权限是不一样的

可以尝试一下输入 setenforce 0,然后重启mysql,apache
  • 打赏
  • 举报
回复
cutemouse 2006-08-25
路径是对的。
我写的PHP代码如下:testfile.php

<?php
$writeok = array("uploads/", "cache/", "templates_c/", "mainfile.php");
$title = "test file php";
$content = "<table align='center'><tr><td align='left'>\n";
$error = false;
foreach ($writeok as $wok) {
echo "<br />"."../".$wok."<br />";
echo fileowner("../".$wok)."<br />";
echo filegroup("../".$wok)."<br />";
echo fileowner("../".$wok)."<br />";
echo substr(sprintf('%o', fileperms("../".$wok)), -4)."<br />";
echo filetype("../".$wok)."<br />";

if (!is_dir("../".$wok)) {


if ( file_exists("../".$wok) ) {
@chgrp("../".$wok, fileowner("../".$wok));
@chmod("../".$wok, 0666);
if (is_writeable("../".$wok)==false) {
$content .= "file ".$wok." is not writeable"."<br />";
$error = true;

}else{
$content .= "file ".$wok." is writeable"."<br />";
}
if (!is_readable("../".$wok)) {
$content .= "file ".$wok." is not readable"."<br />";
$error = true;

}else{
$content .= "file ".$wok." is readable"."<br />";
}

}
} else {
@chgrp("../".$wok, fileowner("../".$wok));
@chmod("../".$wok, 0777);
if (!is_writeable("../".$wok)) {
$content .= "dir ".$wok." is not writeable"."<br />";
$error = true;

}else{
$content .= "dir ".$wok."is writeable"."<br />";
}
if (!is_readable("../".$wok)) {
$content .= "dir ".$wok." is not readable"."<br />";
$error = true;

}else{
$content .= "dir ".$wok." is readable"."<br />";
}
}
}
$content .= "</td></tr></table>\n";

if(! $error) {
$content .= "<p>"."not error"."</p>";


}else{
$content .= "<p>"." error "."</p>";

}

echo $content;

?>



可是执行结果非常奇怪:

../uploads/
0
0
0
0777
dir

../cache/
0
0
0
0777
dir

../templates_c/
0
0
0
0777
dir

../mainfile.php
0
0
0
0666
file
dir uploads/ is not writeable
dir uploads/ is readable
dir cache/ is not writeable
dir cache/ is readable
dir templates_c/ is not writeable
dir templates_c/ is readable
file mainfile.php is not writeable
file mainfile.php is readable



error

到底是什么原因?

  • 打赏
  • 举报
回复
wen8u8 2006-08-21
uploads, cache, templates_c, 你这几个目录的位置放的不对,应该在
HTTPD.CONF文件下设置了以下路径:
Alias /web/ "/opt/xoops-2.0.14/htdocs/"
  • 打赏
  • 举报
回复
xuzuning 2006-08-21
确认目录 uploads, cache, templates_c
在 /opt/xoops-2.0.14/htdocs/ 下存在,且可写

  • 打赏
  • 举报
回复
angel0829 2006-08-20
目录都设置成了666是什么意思?
  • 打赏
  • 举报
回复
anshenghao 2006-08-20
我估计LZ是没有改成777的

或者说改了 但是没成功
  • 打赏
  • 举报
回复
发帖
基础编程
加入

2.1w+

社区成员

从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
申请成为版主
帖子事件
创建了帖子
2006-08-19 11:32
社区公告
暂无公告