The installation problem of PHP + xoops that has been plagued for many days has not been solved

Source: Internet
Author: User

In Linux, I have installed Apache + MySQL + PHP
Set the following path in the httpd. conf file:
Alias/web/"/opt/xoops-2.0.14/htdocs /"
<Directory "/opt/xoops-2.0.14/htdocs/">
Options all Multiviews
AllowOverride none
Order allow, deny
Allow from all
</Directory>
DocumentRoot "/var/www/html"
<Directory/>
Options followsymlinks
AllowOverride none
</Directory>

"Uploads/", "cache/", "templates_c/", "mainfile. php"
Both the 777 and 666 attributes are set in the directory.
However, no matter how it is modified, the following error occurs during the installation of 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 encoded 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)

The old prompt shows that the permission is insufficient. What's wrong?
 

 

Yesterday I wrote a piece of PHP code to test the above problems. The Code is as follows:

<? 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 );

Echo substr (sprintf ('% o', fileperms ("../". $ wok),-4 );
Echo filetype ("../". $ wok );

If (! Is_dir ("../". $ wok )){


If (file_exists (".../". $ wok )){

@ Chmod (".../". $ wok, 0666 );
If (! Is_writeable (".../". $ wok )){
$ Content. = "mainfile. php is not writeable". "<br/> ";
$ Error = true;
Echo $ error;
} Else {
$ Content. = "mainfile. php is writeable". "<br/> ";
}
}
} Else {

@ Chmod (".../". $ wok, 0777 );
If (! Is_writeable (".../". $ wok )){
$ Content. = "dir". $ wok. "is not writeable". "<br/> ";
$ Error = true;
Echo $ error;
} Else {
$ Content. = "dir". $ wok. "is writeable". "<br/> ";
}
}
}
$ Content. = "</TD> </tr> </table>/N ";

If (! $ Error ){
$ Content. = "<p>". "Not error". "</P> ";


} Else {
$ Content. = "<p>". "error". "</P> ";

}

Echo $ content;

?>

 

The returned result is strange. The result is as follows:

 

../Uploads/
00777dir1
../Cache/
00777dir1
../Templates_c/
00777dir1
../Mainfile. php
00666file1

Dir uploads/is not writeable
Dir Cache/is not writeable
Dir templates_c/is not writeable
Mainfile. php is not writeable

Error

 

The directory attribute is 0777 and the file attribute is 666. But when the is_writeable () function is executed, it cannot be written? What is the problem? Is PHP's user permission?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.