Administration
  Home arrow Administration arrow Page 4 - Setting Up Database Driven Websites
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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? 
ADMINISTRATION

Setting Up Database Driven Websites
By: Ying Zhang
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 12
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Setting Up Database Driven Websites - Installing Apache
    (Page 4 of 8 )

    Now we will install Apache. Assuming you downloaded it into /tmp, do the following (note you probably shouldn't be root while doing this):


    $ cd /tmp $ tar -zvxf apache_1.3.6.tar.gz $ cd apache_1.3.6 $ ./configure --sysconfdir=/etc/httpd --datadir=/home/httpd --logfiledir=/var/log/httpd --enable-module=most --enable-shared=max --disable-rule=WANTHSREGEX

    This tells Apache to store it's configuration files in /etc/httpd. The data files directories (HTML documents, CGI-BIN directory) will be rooted in /home/httpd. Next, we tell Apache we want most of the modules enabled, and that they should be built as DSO modules.

    DSO stands for Dynamic Shared Object. By compiling Apache with DSO support, you are able to add and remove modules from Apache without having to recompile it. This is really handy, read all about it at the Apache DSO page (http://www.apache.org/docs/dso.html), if you're interested.

    Next thing to do is to compile this thing. Do this by running make:


    $ make

    That should take a little while. When it finishes, you'll have to su to root to copy the files to their final destinations:


    $ su # make install

    If all goes well, you should see a bunch of messages tell you some information about Apache and how it was installed on your computer.

    Configuring Apache

    Starting from Apache 1.3.4, the three configuration files: srm.conf, httpd.conf, and access.conf have been consolidated into httpd.conf. Naturally, this carries on to 1.3.6, so load it into your favorite editor and change these directives:


    Port 80 DirectoryIndex index.html index.shtml index.cgi index.php3 AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps

    Scan through the files and change any other directives that you feel should be changed. For detailed information about the directives, visit the Apache Website and look at the server documentation.

    Testing Apache

    Run this to start Apache:


    # /usr/local/bin/apachectl start

    If it said that Apache was started, you should be able to use any web browser to connect to your box. If all goes well, you will see a Welcome to Apache page. Also, check that the httpd processes are running:


    # ps ax | grep httpd

    or


    # ps -ef | grep httpd

    depending on your flavour of Unix. You should see a bunch of processes like:


    14362 ? S 0:00 /usr/local/apache/bin/httpd 14364 ? S 0:00 /usr/local/apache/bin/httpd 14365 ? S 0:00 /usr/local/apache/bin/httpd 14366 ? S 0:00 /usr/local/apache/bin/httpd 14367 ? S 0:00 /usr/local/apache/bin/httpd 14368 ? S 0:00 /usr/local/apache/bin/httpd

    Now let's turn off Apache and install PHP.


    # /usr/local/bin/apachectl stop

    As with MySQL, you probably want to add an entry in one of your system startup files to fire up Apache when your system boots up.

    More Administration Articles
    More By Ying Zhang


     

       

    ADMINISTRATION ARTICLES

    - 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
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway