0

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 Forbidden):

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>
Community
  • 1
  • 1
tnw
  • 13,521
  • 15
  • 70
  • 111
  • The phpMyAdmin modal window? I think this might be a server configuration issue not PHP itself. – Tom Hallam Jun 09 '11 at 15:02
  • 1
    'You don't have permission to access /< on this server.' It appears you are requesting a file called '<' which I'm guessing isn't there? – Elliveny Jun 09 '11 at 15:04
  • @GolezTrol: It's in javascript as well. @seacode: any insight on what i might need to change? – tnw Jun 09 '11 at 15:06
  • Is this different from your other question? If not, you should delete it. If it is, you should clarify. – Jeff Jun 09 '11 at 18:09
  • @jeff @sixletter: No, this is not a duplicate. That other question arose as a result of trying to fix this. – tnw Jun 09 '11 at 18:15
  • @Tony what i meant was you seemed to have solved your other question. Does that solution fix this problem as well? – Jeff Jun 09 '11 at 18:17
  • @Jeff No, this problem still stands. – tnw Jun 09 '11 at 18:24
  • @Tory take a look at this: http://www.wampserver.com/phorum/read.php?2,44414,44416 This user got the same error because he/she started his php tag with instead of php – Jeff Jun 09 '11 at 18:29
  • @Jeff: Yeah, I've googled this to no end and found that that was the solution to a lot of these problems. I've checked my code and can't seem to find an error like that. Just in case, I've enabled short tags in phpMyAdmin. Same error still. – tnw Jun 09 '11 at 18:31
  • Is the file containing that code named in such a way that it will be interpreted as PHP? – Chris White Jun 09 '11 at 18:33
  • Ah-ha, code snippets, now we're getting somewhere =] I assume your file ends in .php? – Jeff Jun 09 '11 at 18:33
  • @Jack @Jeff: Yes, it is a .php file. – tnw Jun 09 '11 at 18:35
  • @Tory the post was closed because it looked identical to your other post, pre-edits. If you're still having trouble, I suggest reposting with a title like 'Why isn't WAMP parsing my PHP files?', and make sure to post some of your code and perhaps any relevant info from your httpd config file. – Jeff Jun 09 '11 at 18:52

1 Answers1

3

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.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055