Today, while testing a PHP program, I found this problem:
Forbidden
You don ' t have permission to access/on this server.
At the beginning I was using http://localhost/test.php to carry out the test, did not find the problem, and then to be tested in the intranet will use IP address for that visit, such as: http://10.10.50.195/test.php, there is this problem.
Later consulted a friend (PHP master), said to modify the PHP configuration file httpd.conf.
Locate the configuration section in the original location file
<directory/>
Options FollowSymLinks
AllowOverride None
Order Deny,allow
Deny from all
Satisfy All
</Directory>
Modified into
<directory/>
Options FollowSymLinks
AllowOverride None
Order Deny,allow
# Deny from all
Allow from all
#允许所有访问
Satisfy All
</Directory>
And also
<directory "D:/wamp5/www" >
#
# Possible values for the Options directive are ' None ', ' All ',
&NBSP;&N bsp; # or any combination of:
# Indexes Includes followsymlinks symlinksifownerm Atch execcgi multiviews
#
# "MultiViews" must be named *explicitly *---"Options all"
# doesn ' t give it to you.
#
# The Options directive are both complicated and important. please
# http://httpd.apache.org/do Cs/2.2/mod/core.html#options
# for more information.
#
& nbsp Options Indexes followsymlinks
#
# AllowOverride Controls What directives may is 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>
Modified into
<directory "D:/wamp5/www" >
#
# Possible values for the Options directive are ' None ', ' All ',
&NBSP;&N bsp; # or any combination of:
# Indexes Includes followsymlinks symlinksifownerm Atch execcgi multiviews
#
# "MultiViews" must be named *explicitly *---"Options all"
# doesn ' t give it to you.
#
# The Options directive are both complicated and important. please
# http://httpd.apache.org/do Cs/2.2/mod/core.html#options
# for more information.
#
& nbsp Options Indexes followsymlinks
#
# AllowOverride Controls What directives may is 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>
Then save and restart the service to solve the problem on the access.