PHP
  Home arrow PHP arrow Page 4 - The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP
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? 
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: starstarstarstarstar / 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:
      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


    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

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT