+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: localhost/php/apache

  1. #1
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    localhost/php/apache

    i got sick of uploading all the files i make with php to my site just to test them so i wanted to set up apache php and mysql on my computer so i can just check them by typing localhost into my browser well i installed everything but it seems now that PHP isnt working all i get is an actual index of the files in the directory not the page it is supposed to be i think my configuration is wrong ;(

  2. #2
    acellec is offline x10Hosting Member acellec is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    29

    Re: localhost/php/apache

    Quote Originally Posted by garrensilverwing View Post
    i got sick of uploading all the files i make with php to my site just to test them so i wanted to set up apache php and mysql on my computer so i can just check them by typing localhost into my browser well i installed everything but it seems now that PHP isnt working all i get is an actual index of the files in the directory not the page it is supposed to be i think my configuration is wrong ;(
    isnt it the directory where you put your file is

    D:\xampp\htdocs\xampp
    and when you check the page is

    http://localhost/xampp/ your php file?

  3. #3
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: localhost/php/apache

    acellec, I don't know if he has xampp installed, but I definitely recommend it highly

    If you installed Apache, PHP, and MySQL all separately, you need to edit your configuration files for Apache and PHP, methinks. I would recommend uninstalling everything and downloading xampp ;)

    The other thing is you have to start the Apache and MySQL service.

    You try doing a ping from the command line:

    ping localhost:80
    ping localhost:3306

    If there's no reply, there's no APache or MySQL
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: localhost/php/apache

    Quote Originally Posted by garrettroyce View Post
    ping localhost:80
    ping localhost:3306
    I once made this mistake. ping uses ICMP, which doesn't have ports. You can telnet to port 80. You can also run tcpview to see which ports are bound by which executables. For anyone who hasn't seen them before, Russinovich and Cogswell's Sysinternals utilities are invaluable.

    If you're getting a directory index when index.php is present, it's probably because the server isn't configured to look for index.php when a URL refers to a directory. Look for DirectoryIndex in the server configuration and add 'index.php' at the start of the list of file names.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  5. #5
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: localhost/php/apache

    Quote Originally Posted by misson View Post
    I once made this mistake. ping uses ICMP, which doesn't have ports. You can telnet to port 80. You can also run tcpview to see which ports are bound by which executables. For anyone who hasn't seen them before, Russinovich and Cogswell's Sysinternals utilities are invaluable.

    If you're getting a directory index when index.php is present, it's probably because the server isn't configured to look for index.php when a URL refers to a directory. Look for DirectoryIndex in the server configuration and add 'index.php' at the start of the list of file names.
    Oops, you're right.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  6. #6
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: localhost/php/apache

    thanks guys i didnt know about xampp and now i got it working perfectly

  7. #7
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: localhost/php/apache

    Works every time ;)
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  8. #8
    nick_mok is offline x10Hosting Member nick_mok is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    20

    Re: localhost/php/apache

    Free quick set up would be wamp, php mysql and apache all in one: http://www.wampserver.com/en/


    Nick

  9. #9
    Livewire's Avatar
    Livewire is offline Abuse Compliance Officer Livewire is a glorious beacon of lightLivewire is a glorious beacon of light
    Join Date
    Jun 2005
    Location
    Behind a keyboard.
    Posts
    8,998

    Re: localhost/php/apache

    Quote Originally Posted by nick_mok View Post
    Free quick set up would be wamp, php mysql and apache all in one: http://www.wampserver.com/en/


    Nick
    XAMPP is too, just a matter of preference.


    TOS breakers will be suspended regardless of race, creed, national origin, hair color, or favorite food. Thanks for your understanding!

  10. #10
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: localhost/php/apache

    XAMPP, is, from what i've seen, easier to modify and there are more addons: there is one for tomcat, one for perl one for python.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers