The open_basedir error occurs in require, include, require_once, and include_once.

Source: Internet
Author: User
The following error Warning: include () [functioninclude]: open_basedir is reported as long as you use require or include to contain files (whether xxphp or xxphp ).

The following error is reported if you use require or include files (whether./xx. php or xx. php ).

Warning: include () [function. include]: open_basedir restriction in effect. file () is not within the allowed path (s): (/var/www/:/tmp/:/var/cache/) in/var/www/testdir. php on line 2

Php 5.2.17 I heard that open_basedir has changed. I found that php. ini in php5.2.10 uses the right slash: open_basedir = "e:/web/; C:/WINDOWS/TEMP /;"

After upgrading to 5.2.17, tmd always reports an error and changes it to a left Slash. what is this? no wonder many programs will manually handle the slash problem. it is estimated that this problem should be solved: open_basedir = "e: web; C: WINDOWSTEMP ;"

This solves the problem. if it is not a php setting problem, the error message is usually Warning: include () [function. include]: URL file-access is disabled in the server configuration.

To solve this problem, you only need to adjust the include path normally.

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.