PHP include tips failed to open stream:permission denied in error _php tutorial

Source: Internet
Author: User

PHP include hint failed to open stream:permission denied in error


The failed to open Stream:permission denied in is Apache running user does not have permission to access the specified file, so the directory file cannot be opened.

Prompt when opening a browser

Warning:include (/global.php) [function.include]: failed to open stream:permission denied in \index.php on line 21

Warning:include () [function.include]: Failed opening '/global.php ' for inclusion (include_path= '.; C:\php5\pear ') in index.php on line 21

Fatal error:class ' Fl_global ' not found in \index.php on line 22

From so many error hints we can see a sentence failed to open stream:permission denied in, meaning that there is no access to this issue

Linux Solutions

Linux under

Chmod-r 777./dirname gives directory writable permissions

chmod 777./filename gives the file writable permissions.

Windows 2003 Workarounds

I am an Apache user so I just need to give Apache user permission (if IIS users also need to set permissions in IIS OH)

Example: Right-click on the WWW or web directory, and then click "Security and Sharing" or "properties" can also be opened after the selection of security and so on, and then increase the user and set permissions to access the user must be selected as shown, note that we increase access to the user must be the same as the Apache directory can oh.

http://www.bkjia.com/PHPjc/890392.html www.bkjia.com true http://www.bkjia.com/PHPjc/890392.html techarticle PHP include hint failed to open stream:permission denied in error appears failed to open Stream:permission denied in is Apache running user useless Restrict access to the specified file, ...

  • Related Article

    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.