Home  >  Article  >  Backend Development  >  DISCUZ Unable to access ./include/common.inc.php_PHP tutorial in win2003 environment

DISCUZ Unable to access ./include/common.inc.php_PHP tutorial in win2003 environment

WBOY
WBOYOriginal
2016-07-21 15:23:10705browse

Note from Script House:
Theoretically, the following method is possible, but the premise is to ensure that your PHP configuration is correct. It is recommended that you use the new PHP version, and the discuz program and related server-related software can be found in s. jb51.net download.

The forum often reports error messages in the past two days

Warning: require_once(./include/common.inc.php) [function.require-
once]: failed to open stream: No such file or directory in
E:hostaydswindex.php on line 12

Fatal error: require_once() [function.require]: Failed opening required
'./include/common.inc. php' (include_path='.;C:php5pear') in
E:hostaydswindex.php on line 12

I checked online, it should be a permission request. I don’t know if the forum can be used. Get on.

Solution 1:

In fact, this problem needless to say is so complicated. This problem is caused by directory permission issues.
Everyone knows that the permission settings in 2003 are usually confusing.
The solution expressed in an image is as follows:
For example: your forum is placed in the BBS directory of WEBROOT. If you only give the BBS directory INTERNET to
guest users (or users you specify) The above problem will occur if the upper-level directory webroot of the BBS does not have
INTERNET guest user (or user specified by you) access rights.
As long as you give the WEBROOT directory (which is the superior directory of the forum directory) INTERNET guest permissions (or
your designated user), the problem will be solved!
The reason is: the official ./include/ in all php files can be solved by changing it to include/.
But you can’t replace them one by one. My personal solution is to create a parent directory.

Solution 2:

This server has reinstalled the system
Configured php mysql under win, but when accessing the dz (Discuz) forum, the following error occurred:
Warning: require_once() [function.require-once]: Unable to access
./include/common.inc.php in E:mysiteceshiindex.php on line 12
Warning: require_once(./include/common. inc.php) [function.require-
once]: failed to open stream: No such file or directory in
E:mysiteceshiindex.php on line 12
Fatal error: require_once() [function.require ]: Failed opening required
'./include/common.inc.php' (include_path='d:/php5/includes') in
E:mysiteceshiindex.php on line 12
This website does not have any The problem was that the file was not found

It took me a long time to finally solve it
The problem is:
1. Is the parent path enabled in IIS6.0?
2. The permission issue gives users permission. (Note that the computer directory must also have permissions, otherwise this problem will occur)

Other references:

I moved the forum to my own server. The server is win2003+iis+php+mysql. But when accessing the forum, the following message always appears:

Warning: require_once() [function.require-once]: Unable to access ./include/common.inc.php in E:im286index.php on line 12
Warning: require_once(./include/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in E:im286index.php on line 12

Fatal error: require_once() [function.require]: Failed opening required './include/common.inc.php' (include_path='d:/php5/includes') in E:im286index.php on line 12
method 1: I googled Baidu on the Internet and there were quite a few people who had this problem. Modifying ./include/ to include/ solved the problem, but the rewrite loading was always unsuccessful. It took me a long time to find out that it was a permissions problem, so I set it up. With very one permission, everything will be ok. Finally, I would like to remind everyone that iis needs to enable the parent path.

Method 2:
1. Is parent path enabled in IIS6.0?
2. Permission issue gives users permissions (note that the computer directory must also have permissions, otherwise This problem occurs)

Method 3:
It’s a permission issue. I added everyone read permission to the upper-level directory. It is only for the upper-level directory, but it takes a very long time. I can’t wait and stop. . Change the directory to e:im286bbs, give the upper-level directory everyone read permission and access, prompt:
No input file specified.

Method 4:
Search, 1 The first method is to comment out the doc_root=" in php.ini. I looked at it and it was commented out. This is not the problem. The second method is to talk about the application pool problem. IIS created a new application pool for this site. . Refresh and the website can be accessed. Try again to see if it is related to the permissions of the upper-level directory. Remove the read permission of everyone on the upper-level directory and refresh again. The error is the same as above. I am sure it is related to this. Then add , problem solved.

Method 5:
I also have this problem. I just searched for a long time with no results. I tried to change (./include/common.inc.php) and the result was successful. If you have any problems, try it!
Modify all './' in common.inc.php to '/ (that is, remove the dots in the middle)

Method 6: The ultimate solution
If other programs are normal, but only some PHP systems have problems, here is phpmyadmin as an example. For example, the current directory is d:werrootphpmyadmin. Just create another directory web in the phpmyadmin directory, and then enter it in iis The problem can be solved by locating the path as d:werrootphpmyadminweb. This should be a problem with the use of ./ in the program.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324547.htmlTechArticleScript Home Note: In theory, the following method is possible, but the premise is to ensure that your php configuration is not Error, it is recommended that you use the new php version, discuz program, and related servers...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn