I want to run PHP on my computer, mostly just so I can test it and learn it in a hands-on way. I’m not planning on turning my computer into a server; I just need the practice so I can pursue web development as a career.

3 Responses to “Do you need Apache or other server software to run PHP?”

  • Ryan M:

    While Linux is best to run PHP, you can run it on a Windows server. However it seems to work better with Linux and Apache rather than Windows and IIS. If you need instructions for installing PHP on Windows, check out http://www.hostmysite.com/support/dedicated/general/installphp/

    Hope this helps,
    -Ryan M., Server Engineer @ http://www.hostmysite.com

  • hostmysite.com:

    You only need to use a webserver with PHP if you want to view the parsed code through a web browser. You can easily install PHP on your computer windows or linux and run the code through the command line. Here is an example.

    File: info.php
    content:
    < ?php
    phpinfo();
    ?>

    To run this code you would do the following:

    c:php>php c:websiteswwwrootinfo.php

    This will output the configuration setting in PHP.

    Stephen Williamson, Server Engineer hostmysite.com

  • Sajith Nair:

    As a beginner, best option will be to go to http://www.apachefriends.org/en/xampp.html and install the xampp package they are giving.

    They support most common OS like win, linux, mac, solaris etc

    Just download and install the xampp and you are ready to start coding.

    It will install PHP, Apache, Mysql etc and the best part is it will install most of the php extensions like curl, json, swf etc etc and lot more automatically

Leave a Reply