How can I test PHP Code without uploading?

Discussion in 'PHP' started by wd_2k6, Feb 26, 2009.

  1. #1
    Hi, is there a way to test my php code offline say, rather than having to upload the file to a server and visting that webpage?
     
    wd_2k6, Feb 26, 2009 IP
  2. Shoro

    Shoro Peon

    Messages:
    143
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Shoro, Feb 26, 2009 IP
  3. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Install php on your machine, or use programs like phptriad etc. (or xampp as Shoro suggested)
     
    Joak1m, Feb 26, 2009 IP
  4. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #4
    XAMPP, WAMP, LAMP - web server on your own machine .. :)
     
    ActiveFrost, Feb 26, 2009 IP
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    +1 for Xampp. I do suggest the non installer version and will post more about WHY if you are interested.

    Once you have Apache, php, and mysql running on your local machine you will wonder how you ever lived without it.
     
    Colbyt, Feb 26, 2009 IP
  6. bdtushar

    bdtushar Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think this is the best software
    http://www.mowes.chsoftware.net

    I used all xammp, lamp et... but above is the best, no install, lightweight
     
    bdtushar, Feb 26, 2009 IP
  7. ads2help

    ads2help Peon

    Messages:
    2,142
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Use premade package which include PHP, SQL,etc to make your computer run like a server. Google for Xampp / WAMP.

    - ads2help
     
    ads2help, Feb 26, 2009 IP
  8. lightstarm2k

    lightstarm2k Well-Known Member

    Messages:
    3,626
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    140
    #8
    I use easyphp to test my code.
     
    lightstarm2k, Feb 27, 2009 IP
  9. linkinpark2014

    linkinpark2014 Peon

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I use WAMP..
    but if u r still new on PHP..use PHP GUI..
    its very easy to use..google it..
     
    linkinpark2014, Feb 27, 2009 IP
  10. dotcomguy

    dotcomguy Peon

    Messages:
    824
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #10
    use wamp5 it has an installer.
     
    dotcomguy, Feb 27, 2009 IP
  11. amerigohosting

    amerigohosting Peon

    Messages:
    255
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    upload it to a different directory on your webserver called "testMyNewScript" or something.
    password protect the page.
    happy developing.
     
    amerigohosting, Feb 27, 2009 IP
  12. nileshgund

    nileshgund Well-Known Member

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    #12
    Recommend XAMPP ... You get LAMP system ready with XAMPP with just flew clicks .. enjoy
     
    nileshgund, Feb 27, 2009 IP
  13. dowhile

    dowhile Active Member

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #13
    For windows my recommendation is XAMPP. Under Linux you probably have all set up (LAMP). If you want to do complete testing, with domain name, you can set VirtualHost's.
     
    dowhile, Feb 27, 2009 IP
  14. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #14
    I'm very happy with XAMPP. I have a Windows machine.
     
    Masterful, Feb 27, 2009 IP
  15. w0tan

    w0tan Peon

    Messages:
    77
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I used XAMPP for a long time, and had a few problems with it--nothing major, just small annoyances with Apache and PHP.

    Recently I switched to WampServer 2 and I have to say it's a much nicer program, especially if you've never run a server before. More importantly, it allows you to easily switch between versions of Apache, PHP, and mySQL by downloading their ready made add ons. This makes it easier to match your computers software versions to those running on your production server.

    Others you might want to look into are VertigoServ and Uniform Server. I haven't used either of them, but they each have good reviews.

    Wikipedia also has a nice table that breaks down the difference between the different WAMP options you have. Some of the solutions haven't been updated in a while, you'd be best to avoid anything that doesn't contain PHP 5 or better.
     
    w0tan, Feb 27, 2009 IP
    pipes likes this.
  16. Greg Carnegie

    Greg Carnegie Peon

    Messages:
    385
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #16
    In my opinion WAMP is the best option for newbie, you just install it and ... it works :)
     
    Greg Carnegie, Feb 28, 2009 IP