Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does "403" in php refer to?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "what 403 in php refers to is wrong", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "what 403 in php refers to is wrong" this article bar.

PHP 403 error solution: 1, open the apache configuration file httpd.conf;2, modify the content to "allow from all";3, save the configuration file.

Operating environment: Windows 7 system, PHP 7.1 version, Dell G3 computer.

HTTP Error 403 -Forbidden in PHP

Install Apache, version 2.2.6, just finished testing; configure the php.in file under php localhost again found error: HTTP error 403 -Forbidden: You don't have permission to access / on this server.

Open the apache configuration file httpd.conf and examine it line by line. About halfway there is this code:

Options FollowSymLinks AllowOverride None Order deny,allow Deny from all

I see. Since php is configured, the "Deny from all" here has rejected all connections. Change this line to "allow from all", the modified code is as follows, the problem is solved

Options FollowSymLinks AllowOverride None Order deny,allow allow from all

Open http://localhost again in your browser and show it works!

Summary: If you also have such a 403 forbidden access, you may wish to pay attention to the code of "Deny from all" in the httpd.conf configuration file of apache to see if it has been quietly modified by the system.

You do not have permission to view this page.

You don't have permission to view this directory or page with the credentials you provided.

If you are sure you can view the directory or web page, try contacting the site using the email address or phone number listed on the localhost home page.

You can click Search to find information on the Internet.

HTTP Error 403 -Forbidden

Internet Explorer

There are several ways to solve the above problems:

1.

Options FollowSymLinks AllowOverride None Order deny,allow # Deny from all Satisfy all

2. Find DocumentRoot "D:/www" in the httpd.conf file, where you store your php file, with a line below it

Let's make these two places consistent.

Win7 Apache 403 Error

apache configuration virtual directory, access to the site prompt no permissions, engaged in a few hours, and finally found the wrong reason, it turned out to be my apache configuration file reason,

My apache profile has Alias /myCode "D:/myCode/"

This is the virtual directory setup.

I changed it to Alias /myCode "D:/myCode" All OK

The correct spelling is attached below.

alias/server1 /var/server1 //correct alias/server1/ /var/server1/ //correct alias/server1/ /var/server1 //Error

Apache HTTP 403 Forbidden Error

When configuring Apache services for Linux, http403 errors are often encountered, and I also encountered them when configuring tests today. Finally, I solved them and summarized them. HTTP 403 error means access denied for many reasons. There are four main reasons I have summarized!

1. Insufficient permissions to access document. More than 755 credits. Workaround: Use the command chmod 755 /var/www/or other appropriate directory.

2. SELinux or firewall reasons. Workaround: Shut down SELinux and let the firewall pass WWW services.

3. Virtual host configuration error. Workaround: Reconfigure the virtual host or shut it down temporarily.

4. The alias command is incorrectly configured. (alias Syntax: Alias URL-path file-path| directory-path)

The solution is as follows: Open the apache configuration file httpd.conf and check all alias directives. If the URL-path in the directive contains/at the end, then the file-path or dir-path also needs to contain/at the end, as shown below:

alias/server1 /var/server1 //correct alias/server1/ /var/server1/ //correct alias/server1/ /var/server1 //Error

5. DocumentRoot's settings. The solution is as follows:

Open the Apache configuration file httpd.conf and find this code:

Options FollowSymLinksAllowOverride NoneOrder deny,allowDeny from all

Sometimes "Deny from all" here has rejected all connections due to php configuration. Change the line to "allow from all", the modified code is as follows, the problem is solved.

Options FollowSymLinksAllowOverride NoneOrder deny,allowAllow from all

Delete thinkphp compiled Runtime folder.

The above is "php 403 refers to what is wrong" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report