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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.