Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Server space for newb learning CGI & PHP

  1. May 5, 2007 #1

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Could you recommend a good free site for someone who is just learning to write CGI scripts and PHP, and needs a server to try them out on? I have some space at my school lab, but trying to SSH to it has been bombing out this weekend.

    Thanks!
     
  2. jcsd
  3. May 5, 2007 #2

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Most free sites are not going to allow you to run your own PHP or CGI code; it would be too much of a security risk. That's not to say that no such sites exist; I just simply don't know of any.

    - Warren
     
  4. May 5, 2007 #3
    Why not install a webserver and PHP on your own computer?
     
  5. May 5, 2007 #4

    -Job-

    User Avatar
    Science Advisor

    I've had two free web hosts in the past that supported PHP and ASP, but they're no longer free.

    You should really just setup a PHP web server on your machine, i think that's the best option.
     
  6. May 6, 2007 #5

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Thanks. I saw a couple, but I was afraid of diving in. Didn't know what I might be setting myself up for as far as obligations with them.

    umm, because, I'm a coward?:redface:

    Is it very difficult? How much space (approx.) does it take? All I have at home is my little laptop running Windows XP.
     
    Last edited: May 6, 2007
  7. May 6, 2007 #6

    cronxeh

    User Avatar
    Gold Member

    http://sdf.lonestar.org

    Donate 36 dollars and you'll become a lifetime member of a wonderful community. PHP, Perl, SSH and much more
     
  8. May 6, 2007 #7

    -Job-

    User Avatar
    Science Advisor

    It's not very difficult. Windows XP comes with IIS (Internet Information Services) which is Microsoft's Web & FTP server.
    You can install IIS by going to Control Panel -> Add/Remove Programs -> Add/Remove Windows Components. In the window that comes up highlight "Application Server" and click details, then select IIS and ASP.NET (so you have the option of ASP).

    When IIS is setup you can start using ASP immediatlely. If you have the .NET framework installed (which you probably do), you can also use ASP.NET (after registering the ASP.NET extensions in IIS, but lets not get into that).

    IIS's web root folder will default to c:/inetpub/wwwroot/. This is the folder where you throw your asp, php, html, css ..etc files.
    For testing your site you use http://localhost which is the loopback network interface. So if you add file myapp.asp in the wwwroot folder it will be accessible from http://localhost/myapp.asp.
    To ensure ASP is working properly you can add the following ASP file to wwwroot and see if it works properly:
    Code (Text):

    <%
    Response.Write "This is working"
    %>
     
    Installing PHP can be a little trickier. You download PHP from http://www.php.net/ then configure IIS. There's a variety of tutorials that guide you through the process such as http://www.iis-resources.com/modules/AMS/article.php?storyid=4
     
  9. May 6, 2007 #8

    Math Is Hard

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    hmm.. I had not thought about using IIS. I guess I thought I was going to have to have LINUX/Apache on my machine to work with php. I'm pretty naive about that stuff. I had IIS installed on another machine when I was working with some ASP stuff a few years ago and it was a pretty smooth set up. (Except I was a dork and forgot to patch properly and got the NIMDA virus!) The php set up sounds daunting but I might give that a try if I can't sort out my SSH problem. Thanks, Master Shake.

    And cronxeh, I will check out that site. I wouldn't mind spending a little dough if it is a good spot for learning. Thanks for sharing.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Server space for newb learning CGI & PHP
  1. Php or c++ ? (Replies: 40)

  2. Cgi-bin script issue (Replies: 7)

Loading...