www.webdeveloper.com
Results 1 to 14 of 14

Thread: Beginner's Questions

  1. #1
    Join Date
    Jan 2005
    Posts
    216

    Beginner's Questions

    I'm just starting to learn and work with PHP/MySQL for dynamic web pages. I am a little confused on one thing: what does the PHP download actually do? I know it's a real newbie question, but what does it allow me to do or not do. I cannot seem to find a good explaination of that anywhere. Another thing once I have it on my machine, then do I have to put it on my site, or does a websever already have that?

    Any answer would be appreciated. Thanks.

    dz_boy

    P.S. Any tips you would care to give to a beginner? Thanks...

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,148
    In order to process PHP web pages, the webserver needs to route the source page through the PHP parser/compiler. It parses the PHP portions of the page, compiles it, and executes it, adding any output from it to the http output that is sent to the browser as an HTML page. This parser/compiler is what you would download if you want to run PHP web pages on your PC. You also would need to have a webserver set up on your PC. A fairly painless way to do this is to download and install the XAMPP package, which installs Apache websever and MySQL along with PHP.

    As far as your web host, you'll have to check with them to see if they support PHP (and MySQL or other database system if needed). A quick way to check is to create a file on your web site with a ".php" suffix (such as "test.php") and have just the following as the contents:
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    If, when you access that page from your web host, you get a page with all sorts of info about the PHP installation, then PHP is installed and configured on your host. If all you see are the above lines of code, then it is not.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jul 2005
    Location
    DF
    Posts
    174
    The best tip I can give to anyone starting to develop in php is www.php.net browse through the function list, read comments and you'll understand a lot of things

    Good Luck pal

  4. #4
    Join Date
    Jan 2005
    Posts
    216
    Thanks a lot! I really appreciate it.
    dz_boy

  5. #5
    Join Date
    Jan 2005
    Posts
    216
    Quote Originally Posted by NogDog
    A fairly painless way to do this is to download and install the XAMPP package, which installs Apache websever and MySQL along with PHP.
    So on the internet, my actual web host would be the web server, but on my computer, I need another to do the same thing. This way I can work on my pages on my computer and be able to test them. Is that right? And then PHP that I download is installed on my computer for the same reason: testing. Because it is already "installed" on the internet.

    Thanks for any help you can give.
    Last edited by dz_boy; 12-30-2005 at 04:08 PM. Reason: More understanding...
    dz_boy

  6. #6
    Join Date
    Oct 2005
    Posts
    481
    It may already be installed on your hosting company's server, but not all hosting plans have it installed. That's why NogDog suggested the phpinfo function to see what it returns.

    Yes, the reason you install it on your local machine is for testing purposes.

  7. #7
    Join Date
    Jan 2005
    Posts
    216
    Thanks.
    dz_boy

  8. #8
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by dz_boy
    my actual web host would be the web server
    What might be confusing you is what a web server actually is. It is two things... software (apache/php/mysql) and hardware (a computer of some kind). Irrespective of the type of hardware the web server software is normally apache or IIS with php/perl/mysql support. Hardware can be anything from a PDA through to a PC or rack mounted dedicated server. Most dedicated servers (web host) are inferior to a standard PC in processing power but are optimised for handling multiple requests.

  9. #9
    Join Date
    Mar 2005
    Posts
    159
    You could host your own website. All you would do is install Apache+PHP+MySQL on your own computer and allow other people to access from outside your LAN. But webhosts tend to have the fastest and most reliable service, so I suggest you don't do that. I just thought I'd tell you so you knew that you could use your own computer as a web server.
    Last edited by sftrprod; 12-30-2005 at 06:06 PM.

  10. #10
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by sftrprod
    You could, if you were desperate, host your own website.
    I host my own sites and I certainly don't consider myself desperate. Could you explain further?

  11. #11
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,148
    Quote Originally Posted by bokeh
    I host my own sites and I certainly don't consider myself desperate. Could you explain further?
    Well, you must be desperately geeky, then.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  12. #12
    Join Date
    Mar 2005
    Posts
    159
    I meant if you were desperate for a free host but couldn't find one, but then I found a flaw in that. So now I've edited it out.

  13. #13
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by NogDog
    you must be desperately geeky
    I never thought about it like that before. It just started as an experiment on a dynamic IP. For a few Euros extra I got a static IP. Now I've got mail, DNS and web servers and 14 domains. Adding extra domains costs nothing and another bonus is no need to ftp anything. I can run whatever server software and config I choose and don't need to worry about the security issues of a shared server. The way I see it is, I pay for a full time connection so I might as well use it.

  14. #14
    Join Date
    Nov 2005
    Location
    The best country in the world, Texas!
    Posts
    251
    I've recently started hosting my website off my own box, and find it works fairly well for my purposes. Desperately geeky? Most likely, but it's nice to have everything readily accessible and whatnot...cheaper, too, cause I don't have to pay anyone for hosting, and don't get any of those yucky ad banners that are all over free host sites.

    In an attempt to un-derail this thread, though, if you've got any programming experience, you can pick up the basics of PHP real easy over at http://www.w3schools.com/php
    WARNING: Use code provided at your own risk!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles