PHP
  Home arrow PHP arrow Page 4 - The Soothingly Seamless Setup of Apach...
FaxWave - Free Trial.
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 
IBM Developerworks
 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? 
PHP

The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP
By: Israel Denis Jr. and Eugene Otto
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 41
    2000-06-07

    Table of Contents:
  • The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP
  • Assumptions
  • Prerequisites
  • How it Works
  • Game Plan
  • PHP Installation (*NIX)
  • Apache
  • Testing Our Work: Is Apache working?
  • Is SSL Working?
  • Are PHP and MySQL Working Together?
  • Conclusion

  • 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
     
     
    The Best Selling PC Migration Utility.
     
    ADVERTISEMENT

    PCmover - $15 Off with Coupon Code CJPH7Q

    The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP - How it Works
    (Page 4 of 11 )

    It is helpful to understand what happens behind the scenes. Here is an over-simplification of how things work. The diagram below and the explanation that follows aren't entirely accurate but serve as a quick overview for now:

    The scenario: We have a web page that pulls some data out of a DB. 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 interpreted by the PHP preprocessor and pulls data from the database. The results are then processed by the rest of the PHP script and turned into HTML. The final HTML then gets sent back to the user's browser.



    Let's look at this step by step:
    1. John Doe clicks on a link to from his web browser; his web browser sends the request for http://localhost/test.php.
    2. Apache gets the request for test.php. It knows that .php files are handled by the PHP preprocessor (mod_php) because we specified it in the Apache configuration file, so it tells PHP to deal with it.
    3. test.php is a PHP script that contains commands. One of these commands is to open a connection to a database and grab data. PHP handles the connection to the database, and interprets the SQL calls to extract data from the database.
    4. The database server gets the connection requests from the PHP interpreter, and processes the request. The request could be something like a simple select statement, or a table creation.
    5. The database then sends the response and results back to PHP interpreter.
    6. Apache sends the PHP information back to John Doe's browser, as the response to his request. John Doe now sees a web page containing some information from a database.
    If this had been a request for https://localhost/test.php, then the process would be a little different.
    1. Every request and response is encrypted and decrypted at both ends. That is, the browser connects to Apache, obtains its encryption key, encrypts the request and sends it over.
    2. The server sees the request decrypts it and authenticates it. It processes the file, encrypts it and sends it over. The browser then decrypts it with the server's key. Keep in mind that since the connections are encrypted, different ports are used. Port 80 used in the non-secure connection, while port 443 is used in the secure connection.
    Again, that's not 100% correct but it's a very simplistic overview of what goes on behind the scenes. Now that you have a basic understanding of what we are trying to accomplish, let's get on to installing the software.

    More PHP Articles
    More By Israel Denis Jr. and Eugene Otto


     

       

    PHP ARTICLES

    - Setting Up a Web-based Image Hosting Service
    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery
    - Using Timers to Benchmark PHP Applications
    - Benchmarking Applications with PHP
    - Setting Up a Web-Based File Manager: PHPfile...
    - Developing a Modular Class For a PHP File Up...
    - Setting Up a Web-Based File Manager: bfExplo...
    - Defining a Custom Function for File Uploader...
    - Parsing Child Nodes with the DOM XML extensi...
    - Creating an Error Handling Module for a PHP ...
    - Accessing Attributes and Cloning Nodes with ...
    - Retrieving Information on Selected Files wit...
    - Handling HTML Strings and Files with the DOM...
    - Building File Uploaders with PHP 5

     
    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 1 hosted by Hostway