1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How can I test PHP Files on a local computer?

Discussion in 'PHP' started by kslokesh, Nov 1, 2008.

  1. #1
    I am new to Web Development.. I know basic HTML and CSS. I dont know PHP but I can understand a bit about what does it do..

    I know that a web server must be installed on a computer for testing PHP files.

    Is there any method to test PHP files locally on a computer without having a web server installed?

    And Please tell me in which order should I install the Web server, PHP on the Local computer..

    1st install Apache and later PHP later? Will this work?
     
    kslokesh, Nov 1, 2008 IP
  2. Rory M

    Rory M Peon

    Messages:
    1,020
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Rory M, Nov 1, 2008 IP
  3. ms2134

    ms2134 Well-Known Member

    Messages:
    1,188
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    165
    #3
    ms2134, Nov 1, 2008 IP
    Chios likes this.
  4. techcone

    techcone Banned

    Messages:
    206
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    techcone, Nov 1, 2008 IP
  5. porjung

    porjung Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    put your folder website at C:\AppServ\www\
    and then test in url localhost/your folder website/
     
    porjung, Nov 1, 2008 IP
  6. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #6
    Only problem you might run accross is if the script request a .htaccess file and the rewritebase to be used for SEO Urls. Windows has issues with that.
     
    exodus, Nov 1, 2008 IP
  7. KuyMedia.com

    KuyMedia.com Banned

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    The best thing that I always recommend to anyone, being that this works well for me, is to install Dreamweaver (they do have a trial version if you don't already have it) along with WAMP server. Once you have both installed, configure your test site in Dreamweaver, and you can test locally that way. Dreamweaver even offers the capability to publish your files directly to your web server once you are finished.

    Hope that helped a bit!
     
    KuyMedia.com, Nov 1, 2008 IP
  8. techcone

    techcone Banned

    Messages:
    206
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Actually instead of WAMP , get XAMPP , its better than that as I have used both of them :)
     
    techcone, Nov 1, 2008 IP
  9. sammy2580

    sammy2580 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I've always used Easyphp on my XP machine. It does everything my webhost does and is very easy to use.
     
    sammy2580, Nov 1, 2008 IP
  10. shineDarkly

    shineDarkly Banned

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    you can download pre-configured packages, xampp works the best for me
     
    shineDarkly, Nov 1, 2008 IP
  11. ryandanielt

    ryandanielt Well-Known Member

    Messages:
    1,797
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    185
    #11
    Google something called Vertrigo Server, what this is its a local server that installs php, apache, mysql, sql, phpmyadmin and more and configures it all for you.

    This program is very simple and easy to use and even a 5 year old can install it :D
     
    ryandanielt, Nov 1, 2008 IP
  12. kosmik

    kosmik Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I was in your situation when looking for a test system that's easy to set up until I found EasyPHP.

    Installation shall be straight forward and there's a step by step guide too here:

    http://klikr.net/local-test/
     
    kosmik, Dec 19, 2008 IP
  13. FunkyRes

    FunkyRes Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    If building from source, you want Apache and MySQL (assuming you want MySQL) installed before you build PHP - so that the PHP build process can find the header files.

    If installing compiled solutions, they should have a README associated with them.
     
    FunkyRes, Dec 19, 2008 IP
  14. GameO.Over

    GameO.Over Active Member

    Messages:
    45
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    65
    #14
    If you want to tinker with the 'real thing' you should look into VirtualBox and Vagrant.

    It is essentially a real web server setup on your local machine.

    You can work with HTML, PHP etc as if it is locally on your computer but is accessed as if from a server.

    Here is a tutorial for getting up and running: https://scotch.io/tutorials/get-vagrant-up-and-running-in-no-time

    It requires more technical knowledge than a pre-packaged app like MAMP but is a great learning resource if you want to further develop skills.
     
    GameO.Over, May 8, 2017 IP