Administration
  Home arrow Administration arrow Setting Up Database Driven Websites
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ADMINISTRATION

Setting Up Database Driven Websites
By: Ying Zhang
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 15
    1999-05-20


    Table of Contents:
  • Setting Up Database Driven Websites
  • Requirements
  • Installing MySQL
  • Installing Apache
  • Installing PHP
  • Creating the Database
  • Making a PHP Script
  • Testing the Script

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Setting Up Database Driven Websites
    ( Page 1 of 8 )

    This tutorial is an introductory guide to get you started in the world of server-side-scripting and web databases. It covers installation and configuration of MySQL, Apache, and PHP. An example script is also included as a guide for making your own server-side-scripts.

    This guide walks you through installing a web server, an SQL database server, and a server-side scripting tool that ties everything together. Some of the more popular tools for doing this are Apache, MySQL, and PHP3.

    This is what you will have accomplished after successfully completing this guide:

    • setup the MySQL database server
    • setup the Apache web server
    • setup the PHP 3.0 Hypertext Preprocessor for server-side-scripting
    • create a simple web enabled database

    This guide is meant as an introductory guide to get you started in the world of server-side-scripting and web databases. It will help you get up and running with the aforementioned products, and hopefully give you a better understanding of how this stuff all works.

    How It Works

    It is helpful to have a feeling for what goes on behind the scenes, so here is an over simplification of how things would work,. This diagram isn't really correct but it should be enough for now:

    diagram1.gif (2327 bytes)

    So let's set the scenario. We have a web page that pulls some data out of a database. John Doe requests this page from his browser, the request is sent to the web server which in turn calls a PHP script. The PHP script is executed by the PHP preprocessor, it pulls data from the database. The results are then massaged by the rest of the PHP script and turned into HTML. The final HTML gets sent back to the user's browser.

    Got that? Let's look at this step by step:

    1. John Doe clicks on a link to from his web browser; his web browser sends a request for http://www.foo.com/foofoo.php3.

    2. Apache gets the request for foofoo.php3. It knows that .php3 files are handled by the PHP preprocessor, so it tells PHP to deal with it.

    3. foofoo.php3 is a PHP script that contains commands. One of these commands is to open a connection to a database and grab some data. PHP knows how to talk to the database, so it does its thing.

    4. The data comes back from the database, and foofoo.php3 does something to format the data. Typically this would be to make it look pretty before formatting it into HTML.

    5. The HTML goes back to Apache.

    6. Apache sends this back to John Doe's browser, as the response to his request. John Doe now sees a pretty web page containing some information from a database.

    Again, that's not 100% correct but it's enough to understand what goes on :). Now that we have a basic understanding of what we are trying to accomplish, let's get on to installing the software.



     
     
    >>> More Administration Articles          >>> More By Ying Zhang
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek