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

Source: Internet
Author: User
Tags chmod

The failed to open Stream:permission denied in is the Apache run user does not have permission to access the specified file, causing the directory file to open.

Prompt when you open the browser

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

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

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

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

Linux Solutions

Linux under

Chmod-r 777./dirname Give directory writable permission

chmod 777./filename grants Write permission to the file.

Windows 2003 Solutions

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

Example: Right-click www or web directory, then click on the pop-up "security and sharing" or "properties" can also be opened after the choice of security and so on, and then increase the user and set access to the user's permissions must be selected below the figure shown, note that we increase access to users must be the same as the Apache directory can oh.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.