Testing PHP on localhost

Discussion in 'Web Design & Coding' started by melon, Jul 13, 2003.

  1. melon

    melon MS-DOS 2.0 Political User

    Messages:
    854
    Location:
    Ásgarðr
    I'm trying to be able to test PHP on my local computer. After finding a site that suggested a way of doing it, it told me to install Apache and set it up to the localhost (127.0.0.1). All would be well, except that some computer setting is continually blocking it! I renamed the HOSTS file to something different, and, while I got all my ads back, the localhost was still blocked. Is there something I'm missing? I can't even test to see if my PHP installation is correct, until I can get the localhost to work. So what do I need to do to get it working on an XP Pro machine here?

    BTW, is there any other easier way to test this than to, essentially, install all this server software? The above is all freeware, which is why it has been appealing to me.

    Melon
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
  3. melon

    melon MS-DOS 2.0 Political User

    Messages:
    854
    Location:
    Ásgarðr
    The only question this doesn't solve is why my localhost is blocked. Any theories?

    Would my cable router have anything to do with it?

    Melon
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
  5. melon

    melon MS-DOS 2.0 Political User

    Messages:
    854
    Location:
    Ásgarðr
    Both localhost and 127.0.0.1 are blocked. The folder I've been putting stuff in is correct.

    As for the computer name and computer IP, I don't know how to check those.

    Melon
     
  6. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    For the computer name his WinKey+Pause then go to the "Computer name" tab, its the "Full computer name" part.
     
  7. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Maybe you're running a firewall blocking incoming requests on port 80, even on localhost?
     
  8. melon

    melon MS-DOS 2.0 Political User

    Messages:
    854
    Location:
    Ásgarðr
    Hmm...you may have it, Zedric. I installed PHP Triad and http://localhost:1005 works, but http://localhost does not. The only problem is that I don't know what is blocking it! I don't have the XP firewall on and I doubt that my cable router would be affecting it.

    I tend to think it is something software-wise, because it responds exactly the same way as if I have a blocked server in my HOSTS file. However, when I rename HOSTS to something else, all the ad servers come back, but localhost still is blocked. What else could be causing the problem?

    Melon
     
  9. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    I does sound strange, and it's not the router. If you're not running any firewall it sounds more like some other program is hogging port 80. I think Kazaa can do that for instance.
     
  10. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    you could try running apache on a different port (more secure this way anyway ;) )
    Change the following line in C:\apache\conf\httpd.conf
    :)