Jump to content

Archived

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

jana

Need Help

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?

Share this post


Link to post
Share on other sites
Windows has no CHMOD to set. Do you have two machines or ?? because each one of those ip's that you posted would be a different machine. Unless you have set up another virtual ip for that particular directory.

Good Luck,
Tom

Share this post


Link to post
Share on other sites
yes, i do hav more than 10 machines interconnected via LAN.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×

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.