SlideShare a Scribd company logo
1 of 11
Download to read offline
New York PHP - Introduction to AMP Technology




  Download
  Presentation




                                 Introduction to AMP Technology
                                                          Technical Overview



                                             NYPHP Internal Presentation
                                                September 25, 2002
                            Presented by Hans Zaunere, Daniel Kushner and Bill Patterson




            http://www.nyphp.org                    http://apache.org         http://mysql.com   http://php.net   9/25/02



http://www.nyphp.org/content/presentations/ampintro2/[9/12/2009 5:53:09 PM]
New York PHP - AMP Technology - Technical Overview - Slide 1 of 10




                                                                      1     2      3     4   5   6   7   8   9   10




                 AMP Setup and Implementation?
               Installing and configuring each component
                      Apache with Dynamic Shared Object (DSO)
                      Support
                      Standard MySQL
                      PHP 4 as a DSO with native MySQL support
               Testing the install with phpMyAdmin
               Using AMP
                      Setting php.ini values at runtime
                      Array manipulation
                      Database connections and queries
                      Error checking and reporting




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/001.php?body=48[9/12/2009 5:53:17 PM]
New York PHP - AMP Technology - Technical Overview - Slide 2 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                                   Apache 1.3.26
               --prefix=/demo/apache
                      Apahe's tree top
               --enable-module=so
                      Enable DSO support (mod_php)
               --with-port=8000
               --server-uid[gid]=praxis
                      Only Apache children will run as this user/group




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/002.php?body=48[9/12/2009 5:53:21 PM]
New York PHP - AMP Technology - Technical Overview - Slide 3 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                                MySQL 3.23.52
                                             Configuration and Compilation


               --prefix=/demo/mysql
                      MySQL's tree top
               --with-unix-socket-
               path=/demo/tmp/mysql.sock
                      Needed with multiple MySQL instances per box
               --with-mysqld-user=praxis
                      MySQL will completely drop root and run as this
                      user
               MySQL offers many other configuration
               options:
                      DB handlers (InnoDB) provide transactions etc.
                      Compilation tweaks for improved performance
               MySQL AB binaries are recommended for
               production systems (notably on Linux)



   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/003.php?body=48[9/12/2009 5:53:24 PM]
New York PHP - AMP Technology - Technical Overview - Slide 4 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                                MySQL 3.23.52
                                             Configuration and Compilation


               /demo/mysql/bin/mysql_install_db
                      Prepare and install the 'mysql' database
                              User and permission data dictionary used internally by
                              MySQL
               /demo/mysql/bin/safe_mysqld &
                      Start mysqld wrapped in a monitoring script
               /demo/mysql/bin/mysqladmin -u root –p
               'demo'
                      Set root (superuser) password for MySQL
                      Has no bearing on operating system accounts




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/004.php?body=48[9/12/2009 5:53:27 PM]
New York PHP - AMP Technology - Technical Overview - Slide 5 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                                           PHP 4.2.3
                                             Configuration and Compilation


               --prefix=/demo/php
                      PHP's tree top
               --with-apxs=/demo/apache/bin/apxs
                      Compile PHP as an Apache DSO
               --with-mysql=/demo/mysql
                      Point to MySQL's native client libraries




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/005.php?body=48[9/12/2009 5:53:30 PM]
New York PHP - AMP Technology - Technical Overview - Slide 6 of 10


                                                               1     2      3     4     5    6    7   8   9   10




                                                           PHP 4.2.3
                                                      Setup and Integration


               cp php.ini-recommended
               /demo/php/lib/php.ini
                      Always use php.ini-recommended
                              Maintainable configuration for future PHP versions
               Ensure proper httpd.conf directives:
                      LoadModule php4_module                                                     libexec/libphp4.so
                              Load PHP DSO
                      AddType application/x-httpd-php .php
                              Pass .php files to PHP
                      AddType application/x-httpd-php-source .phps
                              Pass .phps (source) files to PHP for syntax highlighting




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/006.php?body=48[9/12/2009 5:53:32 PM]
New York PHP - AMP Technology - Technical Overview - Slide 7 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                       Getting AMP Online
               The data layer (MySQL) is already started
               Fire up the interface layer:
                      /demo/apache/bin/apachectl start
               http://demo.nyphp.org:8000/sql/
                      phpMyAdmin is a good test to ensure everything is
                      properly loaded and configured




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/007.php?body=48[9/12/2009 5:53:34 PM]
New York PHP - AMP Technology - Technical Overview - Slide 8 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                     Putting AMP to Work
                                                                   initial.phps


               http://demo.nyphp.org:8000/code/initial.phps
               View source with PHP's built-in
               highlighting
               GET method checking as a failsafe
               Override php.ini setting
                      Show errors in browser (stdout)
               Get MySQL connection online
                      localhost connections use UNIX domain sockets
               Create array of queries
                      PHP forms a sequential integer-indexed array




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/008.php?body=48[9/12/2009 5:53:36 PM]
New York PHP - AMP Technology - Technical Overview - Slide 9 of 10


                                                               1     2      3     4     5    6   7   8   9   10




                                  Putting AMP to Work...
                                                                   initial.phps


               Loop through queries, processing and error
               checking
               Reconnect to MySQL with the same DB
               resource
                      Different username/password implies new
                      connection
                      Old resource is dereferenced and freed by garbage
                      collector
               Create nested arrays for member
               information
                      Automatic sequential integer-indexed array
                      Each element contains a user-defined associative
                      array
               Loop through members, forming proper
               query
                      INSERT will generate non-zero ID
                      (auto_increment)
   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/009.php?body=48[9/12/2009 5:53:38 PM]
New York PHP - AMP Technology - Technical Overview - Slide 10 of 10




                                                        1      2      3    4     5      6    7   8   9   10




                                                            Resources
               Zend - The PHP Company
               PHPBuilder Tutorials, Articles and Code
               PHP Triad - AMP Technology Installer for
               Windows
               AMP Based Professional CMS
               phpMyAdmin, phpPgAdmin, Tutorials and
               more
               DMOZ Open Directory PHP Tutorials
               New York PHP Projects and Knowledge
               Base




   http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02



http://www.nyphp.org/content/presentations/ampintro2/010.php?body=48[9/12/2009 5:53:40 PM]

More Related Content

More from tutorialsruby

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 

More from tutorialsruby (20)

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Beginning-Linux-Apache-MySQL-PHP-Technical-Overview

  • 1. New York PHP - Introduction to AMP Technology Download Presentation Introduction to AMP Technology Technical Overview NYPHP Internal Presentation September 25, 2002 Presented by Hans Zaunere, Daniel Kushner and Bill Patterson http://www.nyphp.org http://apache.org http://mysql.com http://php.net 9/25/02 http://www.nyphp.org/content/presentations/ampintro2/[9/12/2009 5:53:09 PM]
  • 2. New York PHP - AMP Technology - Technical Overview - Slide 1 of 10 1 2 3 4 5 6 7 8 9 10 AMP Setup and Implementation? Installing and configuring each component Apache with Dynamic Shared Object (DSO) Support Standard MySQL PHP 4 as a DSO with native MySQL support Testing the install with phpMyAdmin Using AMP Setting php.ini values at runtime Array manipulation Database connections and queries Error checking and reporting http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/001.php?body=48[9/12/2009 5:53:17 PM]
  • 3. New York PHP - AMP Technology - Technical Overview - Slide 2 of 10 1 2 3 4 5 6 7 8 9 10 Apache 1.3.26 --prefix=/demo/apache Apahe's tree top --enable-module=so Enable DSO support (mod_php) --with-port=8000 --server-uid[gid]=praxis Only Apache children will run as this user/group http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/002.php?body=48[9/12/2009 5:53:21 PM]
  • 4. New York PHP - AMP Technology - Technical Overview - Slide 3 of 10 1 2 3 4 5 6 7 8 9 10 MySQL 3.23.52 Configuration and Compilation --prefix=/demo/mysql MySQL's tree top --with-unix-socket- path=/demo/tmp/mysql.sock Needed with multiple MySQL instances per box --with-mysqld-user=praxis MySQL will completely drop root and run as this user MySQL offers many other configuration options: DB handlers (InnoDB) provide transactions etc. Compilation tweaks for improved performance MySQL AB binaries are recommended for production systems (notably on Linux) http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/003.php?body=48[9/12/2009 5:53:24 PM]
  • 5. New York PHP - AMP Technology - Technical Overview - Slide 4 of 10 1 2 3 4 5 6 7 8 9 10 MySQL 3.23.52 Configuration and Compilation /demo/mysql/bin/mysql_install_db Prepare and install the 'mysql' database User and permission data dictionary used internally by MySQL /demo/mysql/bin/safe_mysqld & Start mysqld wrapped in a monitoring script /demo/mysql/bin/mysqladmin -u root –p 'demo' Set root (superuser) password for MySQL Has no bearing on operating system accounts http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/004.php?body=48[9/12/2009 5:53:27 PM]
  • 6. New York PHP - AMP Technology - Technical Overview - Slide 5 of 10 1 2 3 4 5 6 7 8 9 10 PHP 4.2.3 Configuration and Compilation --prefix=/demo/php PHP's tree top --with-apxs=/demo/apache/bin/apxs Compile PHP as an Apache DSO --with-mysql=/demo/mysql Point to MySQL's native client libraries http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/005.php?body=48[9/12/2009 5:53:30 PM]
  • 7. New York PHP - AMP Technology - Technical Overview - Slide 6 of 10 1 2 3 4 5 6 7 8 9 10 PHP 4.2.3 Setup and Integration cp php.ini-recommended /demo/php/lib/php.ini Always use php.ini-recommended Maintainable configuration for future PHP versions Ensure proper httpd.conf directives: LoadModule php4_module libexec/libphp4.so Load PHP DSO AddType application/x-httpd-php .php Pass .php files to PHP AddType application/x-httpd-php-source .phps Pass .phps (source) files to PHP for syntax highlighting http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/006.php?body=48[9/12/2009 5:53:32 PM]
  • 8. New York PHP - AMP Technology - Technical Overview - Slide 7 of 10 1 2 3 4 5 6 7 8 9 10 Getting AMP Online The data layer (MySQL) is already started Fire up the interface layer: /demo/apache/bin/apachectl start http://demo.nyphp.org:8000/sql/ phpMyAdmin is a good test to ensure everything is properly loaded and configured http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/007.php?body=48[9/12/2009 5:53:34 PM]
  • 9. New York PHP - AMP Technology - Technical Overview - Slide 8 of 10 1 2 3 4 5 6 7 8 9 10 Putting AMP to Work initial.phps http://demo.nyphp.org:8000/code/initial.phps View source with PHP's built-in highlighting GET method checking as a failsafe Override php.ini setting Show errors in browser (stdout) Get MySQL connection online localhost connections use UNIX domain sockets Create array of queries PHP forms a sequential integer-indexed array http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/008.php?body=48[9/12/2009 5:53:36 PM]
  • 10. New York PHP - AMP Technology - Technical Overview - Slide 9 of 10 1 2 3 4 5 6 7 8 9 10 Putting AMP to Work... initial.phps Loop through queries, processing and error checking Reconnect to MySQL with the same DB resource Different username/password implies new connection Old resource is dereferenced and freed by garbage collector Create nested arrays for member information Automatic sequential integer-indexed array Each element contains a user-defined associative array Loop through members, forming proper query INSERT will generate non-zero ID (auto_increment) http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/009.php?body=48[9/12/2009 5:53:38 PM]
  • 11. New York PHP - AMP Technology - Technical Overview - Slide 10 of 10 1 2 3 4 5 6 7 8 9 10 Resources Zend - The PHP Company PHPBuilder Tutorials, Articles and Code PHP Triad - AMP Technology Installer for Windows AMP Based Professional CMS phpMyAdmin, phpPgAdmin, Tutorials and more DMOZ Open Directory PHP Tutorials New York PHP Projects and Knowledge Base http://www.nyphp.orghttp://apache.orghttp://mysql.comhttp://php.net9/25/02 http://www.nyphp.org/content/presentations/ampintro2/010.php?body=48[9/12/2009 5:53:40 PM]