Home >Backend Development >PHP Problem >php403 error
We use http://localhost/test.php for local testing and no problems are found. When testing on the intranet, use the IP address for access, such as: http:// 10.10.50.195/test.php, the problem of 403 error occurred. The method to solve this problem is as follows:
1. First modify the php configuration file httpd.conf
Find the configuration section in the original location file
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Satisfy all </Directory>Change
to
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow # Deny from all Allow from all #允许所有访问 Satisfy all </Directory>
and
<Directory "D:/Wamp5/www"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory>
to
<Directory "D:/Wamp5/www"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove Order Deny,Allow # Deny from all # Allow from 127.0.0.1 Allow from all </Directory>
2. Then save, restart the service, and access again to solve the problem.
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of php403 error. For more information, please follow other related articles on the PHP Chinese website!