开发者

Weird 403 Forbidden: You don't have permission to access /< on this server [duplicate]

开发者 https://www.devze.com 2023-03-11 22:49 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: All localhost pages via WAMP blocked??
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

All localhost pages via WAMP blocked??

I'm running WAMP on localhost and am trying to use a modal window to submit something to my database.

When I had the form to submit outside of the modal window to appear on the page itself, no problems.

When I try to submit from the modal window, I get the following error (403 Forbidd开发者_运维问答en):

Forbidden

You don't have permission to access /< on this server.

Any ideas? I'm not sure what to try next.

EDIT: This is NOT a duplicate. My other question arose in the process of trying to fix this.

EDIT2: I used GET instead of POST to see if I can narrow down this problem. Here's what comes into my address bar when I get this error:

http://localhost/%3C?php%20echo%20$_SERVER['PHP_SELF'];%20?%3E

And here's the code in that php file (that's associated with the modal window)

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<label> <br /><br /><br /><br /><br />Who?: <br />
<textarea name="nametext" rows="1" cols="10"></textarea></label>
<select name="ident" id="ident">
        <option value="yankees">Yankees</option>
        <option value="phillies">Phillies</option>
        <option value="announcer">Announcer</option>
</select>
<label> <br />What did they say?: <br />
<textarea name="quotetext" rows="10" cols="26"></textarea></label>
<input type="submit" value="Submit!" />
<br />
</form>
<a href="#" class="lbAction" rel="deactivate">Close Lightbox.</a>


Here's what comes into my address bar when I get this error:

http://localhost/%3C?php%20echo%20$_SERVER['PHP_SELF'];%20?%3E

Then your PHP is not getting parsed. Your HTML form contains the raw PHP code as its destination, so of course you're getting access failure — a few factors may be contributing to your getting 403, not 404.

Fix your server config to make PHP work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号