SoFunction
Updated on 2025-04-09

DISCUZ's ultimate solution to Unable to access ./include/ in... in win2003 environment

My note:
Theoretically, the following method is OK, but the premise is to ensure that your php configuration is free of errors. It is recommended that you use the new version of the php version, which is related to the discuz program, and related server-related software to download it from S.

The forum often reported error messages in the past two days

Warning: require_once(./include/) [-
once]: failed to open stream: No such file or directory in
E:\host\aydsw\ on line 12

Fatal error: require_once() []: Failed opening required
'./include/' (include_path='.;C:\php5\pear') in
E:\host\aydsw\ on line 12

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

Solution 1:

In fact, this question needs not to be as complicated as it is. This is caused by directory permissions.
Everyone knows that the permission settings in 2003 are usually confusing.
The solution to image point expression is as follows:
For example: Your forum is placed in the BBS directory of WEBROOT. If you only assign the BBS directory INTERNET
The access permissions of the guest user (or the user you specified) are not available for BBS's superior directory webroot
The above problems arise when accessing the INTERNET guest user (or the user you specified).
Just give WEBROOT the directory (that is, the upper directory of the forum directory) to INTERNET guest permissions (or
The problem of the user you specified can be solved!
The reason is: the official will change the ./include/ in all php files to include/ to solve it.
But you can't replace them one by one. The personal solution is to create a parent directory.

Solution 2:

The server has reinstalled the system today
The configuration of php mysql is under win, but the following error occurred when accessing the dz (Discuz) forum:
Warning: require_once() [-once]: Unable to access
./include/ in E:\mysite\ceshi\ on line 12
Warning: require_once(./include/) [-
once]: failed to open stream: No such file or directory in
E:\mysite\ceshi\ on line 12
Fatal error: require_once() []: Failed opening required
'./include/' (include_path='d:/php5/includes') in
E:\mysite\ceshi\ on line 12
There is no problem with this website, it is prompted that the file was not found

After a long time, it was finally solved
The problem is:
1. IIS6.0 has the parent path enabled
2. The permission issue gives users permission (note that the directory on the computer must also have permission, otherwise this problem will occur)

Other references:

Transfer the forum to your own server, which is win2003+iis+php+mysql, but visiting the forum always prompts the following information:

Warning: require_once() [-once]: Unable to access ./include/ in E:\im286\ on line 12
Warning: require_once(./include/) [-once]: failed to open stream: No such file or directory in E:\im286\ on line 12

Fatal error: require_once() []: Failed opening required './include/' (include_path='d:/php5/includes') in E:\im286\ on line 12
Method 1: I also Googledou online. There are quite a few people who have this problem. I modified ./include/ to solve the include/ problem, but the rewrite loading is always unsuccessful. I spent a long time to find out that it was a permission problem. I set very permissions for very ones, and everything is OK. Finally, I remind everyone that IIS must enable the parent path.

Method 2:
1. IIS6.0 has the parent path enabled
2. The permission issue gives users permission (note that the directory on the computer must also have permission, otherwise this problem will occur)

Method 3:
It is a permission issue. Everyone read permission was added to the upper directory, which was only for the upper directory, but it was very long and couldn't wait, so it stopped. Change the directory to e:\im286\bbs, give the upper directory everyone to read permissions, access, prompt:
No input file specified.

Method 4:
Search, the first one says to comment out the doc_root =" in it. I looked at it and it was commented out, not this problem. The second one says the problem of the application pool. IIS has created a new application pool for this site. Refresh it, and the website can be accessed. Try again, is it related to the permissions of the superior directory? Remove the read permissions of everyone in the superior directory and refresh it. It prompts that it is the same as the above error. It is confirmed that it is related to this, and then add it to solve the problem.

Method 5:
I also had this problem. I just searched for it for a long time without any results. I tried to change it (./include/), but it was successful. If you have any problems, you might as well try it!
Modify all './ to '/ (that is, remove the middle point)

Method 6: The ultimate solution
If other programs are normal but only some php systems have problems, here we take phpmyadmin as an example. For example, if the current directory is d:\werroot\phpmyadmin, just create another directory web in the phpmyadmin directory, and then locate the path in iis as d:\werroot\phpmyadmin\web to solve the problem. This should be a problem with ./ in the program.