Jump to content

Need Help


jana

Recommended Posts

i am new to php. i hav installed wamp and created a simple script tst.php as

<?php
echo "hello world";
?>
on machine (10.0.0.1) and worked fine on this machine when i tried the same script on 10.0.0.2 as (http://10.0.0.2/tst.php)
an error apperas as

"[color=red][size=10pt]Forbidden

You don't have permission to access /tst.php on this server.
Apache/2.0.59 (Win32) PHP/5.1.6 Server at 10.0.0.1 Port 80[/size][/color]"

can anyone tell me how to solve this?
Link to comment
https://forums.phpfreaks.com/topic/23255-need-help/
Share on other sites

Ok then. You will, most likely need to change your vhost configuration in the http.conf. Instead of having something like this.

[code]
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:\wamp\www"
</VirtualHost>
[/code]

change * to the ip on the local network of the server.
also make sure that you do not have it set to listen like this.

[code]LISTEN localhost:80[/code]

rather [code]Listen 80[/code]

That should fix the problem.

Hope that helps,
Tom
Link to comment
https://forums.phpfreaks.com/topic/23255-need-help/#findComment-106177
Share on other sites

If you have the newest version of wamp then disregard my previous post had make the following changes to the http.conf.

[code]
ServerName localhost:80
[/code]

localhost should be changed with the ip address of the server

and in:

[code]
<Directory "C:/wamp/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.0/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>

[/code]

change Allow from 127.0.0.1    to  Allow from All

Good Luck,
Tom

Link to comment
https://forums.phpfreaks.com/topic/23255-need-help/#findComment-106178
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.