Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access permission problem

Status
Not open for further replies.

hansu

Programmer
Mar 12, 2002
89
Hi

I am new to PHP and Apache.
I want to test my PHP-scripts locally and so far everything worked fine. Now I'm trying to process a form with:

Code:
<form name=&quot;contact&quot; action=&quot;<?= echo $_SERVER['PHP_SELF'] ?>&quot; method=&quot;POST&quot;>

That generates error 403:
Forbidden. You don't have permission to access ./path/... on this server.

The file is in the htdocs of apache.

Can anyone tell me how and where to set permissions correctly to run the script locally?
Apache 2.0, PHP 4.3.3, Win 95.

Thanks for any assistance.
 
do a view source and check where the action is going...

Known is handfull, Unknown is worldfull
 
try changin it to:
<form name=&quot;contact&quot; action=&quot;<?=$_SERVER['PHP_SELF']?>&quot; method=&quot;POST&quot;>

(-:
 
Thanks vbkris and stakadush
View source just shows the code-line as it was entered.
Changing to
<form name=&quot;contact&quot; action=&quot;<?=$_SERVER['PHP_SELF']?>&quot; method=&quot;POST&quot;>
produces the same error.

Any other ideas?
 
>>View source just shows the code-line as it was entered.

meaning? does it show the php tags itself?

Known is handfull, Unknown is worldfull
 
vbkris
Yes, it shows the php tags.
 
stakadush
The file is a .html file.
 
yeah, same doubt here, if it a PHP file u cannot see the <??> tags (see if the extension is .php)...

Known is handfull, Unknown is worldfull
 
the file has to be .php file in order for php to be parsed. change the extension...:)

(-:
 
Yes, that was the problem. I changed the extension to .php and it works now.

Thanks very much for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top