Is there a way to have PHP scripts work offline?

Discussion in 'Programming' started by darren132, Dec 17, 2006.

  1. #1
    Is there a way I can have PHP scripts work offline by perhaps installing a PHP program on my computers hard drive. As of right now, I do all my PHP on a host server online and sometimes it's really slow. I would like to do my programming offline and then once it's working correctly, upload it to my host server as I imagine it would be faster.

    I think I would also have to install MySQL on my local machine as well. I'm not really sure how other programmers do it, unless they do it all online, but I've had a programmer tell me before when he was working on a project for me that he would upload the updates to his server once he was finished encoding, so there must be a way to do it.
     
    darren132, Dec 17, 2006 IP
  2. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes : you can get apache + mysql + php in a single package and install it on your PC, once done with the code just upload it to the server. You can try something like : http://www.wampserver.com/en/ (it even has phpmyadmin).
     
    maiahost, Dec 17, 2006 IP
  3. MKInfo

    MKInfo DP Guard Dog

    Messages:
    1,481
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    140
    #3
    I use this myself.Excellent package.
     
    MKInfo, Dec 17, 2006 IP
  4. bilalinamdar

    bilalinamdar Well-Known Member

    Messages:
    604
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #4
    use XAMPP search google for it.. Very easy..
    Also there are other Like EasyPHP.. There are many just do a google search PHP ON LOCALHOST.
     
    bilalinamdar, Dec 18, 2006 IP
  5. fadetoblack

    fadetoblack Peon

    Messages:
    416
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    download WAMP and install it and u can work on PHP on ur local server , u need to turn of IIS before that
     
    fadetoblack, Dec 18, 2006 IP
  6. bilalinamdar

    bilalinamdar Well-Known Member

    Messages:
    604
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    120
    #6
    In xampp u do not need to know abt IIS and other stuff.. Just install and Put ur PHP files in the htdocs folder... There is a neat control panel for xampp just run APACHE from there. And type the address
    http://localhost/xxxx/xxxxx.php etc Easy
     
    bilalinamdar, Dec 18, 2006 IP
  7. Nightmare

    Nightmare Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Nightmare, Dec 18, 2006 IP
  8. coolmaste

    coolmaste Peon

    Messages:
    120
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    easyphp v 1.8 is nice . Try that
     
    coolmaste, Dec 18, 2006 IP
  9. darren132

    darren132 Well-Known Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    108
    #9
    Thanks for the help, I guess I'll research into some of these and try them out to see which one I like best.
     
    darren132, Dec 18, 2006 IP
  10. soju

    soju Peon

    Messages:
    2,517
    Likes Received:
    127
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You might want to think about getting a free hosting account or something if you really want to test the scripts online. There are many of those too. Search Google.
     
    soju, Dec 18, 2006 IP
  11. jac666

    jac666 Active Member

    Messages:
    182
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    68
    #11
    free hosting account works for me. but also was looking for somthing to run on my pc, i test wampserver.com/en works good. thanks
     
    jac666, Dec 18, 2006 IP
  12. darren132

    darren132 Well-Known Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    108
    #12
    I actually have a paid hosting as they are always better. I was just looking for a solution to doing all my PHP offline instead of always being online.

    I downloaded XAMPP simply because it looked easy to use and you can also convert back and forth between PHP 4 and 5. It seems to work very well know that I have it working on my computer.

    Does anyone know how I can click on a PHP file and have it run right away in IE from my localhost using XAMPP. I uploaded the files to the htdocs folder, but when I click on a PHP file to run in IE, it doesn't work. Instead I have to go and type in the URL in the address bar.
     
    darren132, Dec 19, 2006 IP
  13. creationz

    creationz Well-Known Member

    Messages:
    2,080
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    128
    #13
    was looking for something like this.....
    thanks....
     
    creationz, Dec 19, 2006 IP
  14. weknowtheworld

    weknowtheworld Guest

    Messages:
    306
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Install IIS and PHP 5 along with Mysql in your system if you use windows as OS..
     
    weknowtheworld, Dec 19, 2006 IP
  15. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Well that's kind of tricky ... first of you should have the files in the htdocs folder. Then you should specify that php files are opened with IE or FF and then (that's what I don't know how to do) instead of opening them in the htdocs folder it should be directed to http://localhost/filename.php . I know how to make this work in Dreamweaver but that's something else :)
     
    maiahost, Dec 19, 2006 IP
  16. thedark

    thedark Well-Known Member

    Messages:
    1,346
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    168
    Digital Goods:
    1
    #16
    you can't do it without installing apache and php
     
    thedark, Dec 19, 2006 IP
  17. jamjv

    jamjv Peon

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #17
    WAMP is great! One of the best free softwares I've ever used.
     
    jamjv, Dec 19, 2006 IP
  18. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #18
    Seems a lil strange that you would know how to program but not know how to install apache + php + mysql :S
     
    krakjoe, Dec 19, 2006 IP
  19. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #19
    Barti1987, Dec 19, 2006 IP
  20. darren132

    darren132 Well-Known Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    108
    #20
    Yes, that's exactly what needs to happen is it needs to open in IE as (http: //localhost/filename .php). As of right now it's just opening it from the document folder as something like (http: //program files/XAMPP/htdocs/filename .php), so it doesn't work. I actually get a dialog box that opens asking me to download the file.

    I had to put the spaces inbetween the links because I apparently haven't met my post quota.

    I do have apache and php installed and it still won't work.

    I'm not an experienced programmer and I can only do some things in PHP. I usually have another programmer do the things I don't know how to do, but would like to learn how to do more of the PHP coding myself. I've always worked with PHP scripts online because they wouldn't work offline, which is why I wanted to find a tool to do it offline because my host server is sometimes slow and it's a longer process. I'm experienced in HTML and knew how to do that offline, it was just the PHP code that I wanted to do offline.
     
    darren132, Dec 19, 2006 IP