SlideShare a Scribd company logo
PHP, LAMP* Stack &
WordPress
*LAMP = Linux, Apache, MySQL, PHP
Aug 28, 2018
Agenda
• Introduction to PHP & LAMP stack
• How PHP & LAMP took the world (at least, shared hosting) by storm
 Why PHP is widely used despite being among the “most disliked” languages!
• PHP applications & frameworks; Laravel
• WordPress (and why it powers 31% of the Internet / websites)
• Demo: installing LAMP, some simple PHP code, installing WordPress
PHP
• PHP: Hypertext Preprocessor
 Open source loves recursive acronyms! Other examples: GNU, cURL, RPM, WINE
 Used to be: Personal Home Page Tools (1994-1997)
• Developed by Rasmus Lerdorf in 1994
• PHP Versions
 Initally not meant to be a separate language: worked with CGI (Common Gateway
Interface) scripts / binaries to generate dynamic web pages
 PHP 3 & 4 (1997): re-write of initial PHP. Powered by new Zend Engine.
 PHP 5 (2004): support for OOP & classes, PDO (Data Objects), Windows support!
 Namespaces (backported from PHP 6 which was never released)
 PHP 7 (2014): mainly performance enhancements, reportedly up to 2x
 Multiple legacy features removed (PHP 4 constructor style, <? ?> delimiters)
Perl / Python
• P in LAMP stack could also refer to
Perl or Python
• Won’t be discussing those today
• Very different from PHP!
• Examples of directory iteration in
Perl (top) & Python (bottom)
• Today
 Perl used to be go-to script for DevOps
and sysadmins; now less popular
 Python has become Swiss army knife:
used in production systems, DevOps
scripts, automation, production systems
& even web frameworks
PHP Basics
• Early PHP (3 and 4) was similar to C
– actually used C function names
• PHP 5+ introduced OOP and
namespaces
• Embedded in HTML documents using
<?php and ?>. File saved as .php,
parsed server-side (web server with
PHP module) and sent as HTML.
 Similar to ASP.Net, JSP, etc
• Drop / copy your PHP files into a web
server, and they just run. No
compilation, build, etc.
 Deployment = test locally, commit to git,
SSH into server, “git pull”
Google Trends: PHP, Python, Perl
Most Disliked Languages
2017 Stackoverflow Survey
https://stackoverflow.blog/2017/10/31/disliked-programming-languages/
LAMP Stack
• LAMP = Linux, Apache, MySQL,
PHP (or Perl or Python)
 Linux = OS
 Apache = Web Server
 MySQL = Database
 PHP = Language
• WAMP = Windows, Apache,
MySQL, PHP
 MAMP = Mac OS, Apache, …
• MEAN = MongoDB, Express.js,
AngularJS, Node.js
• WISA (!) = Windows, IIS, SQL
Server, ASP.Net
Source: https://www.freelancinggig.com/blog/2017/08/04/lamp-stack-vs-wisa-stack-best-startup/
Shared Hosting & PHP’s Popularity
• Made popular by GoDaddy
• Bunch of contenders:
DreamHost, HostGator,
1and1, Bluehost, SiteGround
• Web presence at low prices;
multiple domains on 1 server
 $5-$10 a year for a domain
 $3-$10 a month for hosting =
$36 - $60 a year
• Small businesses flocked
towards them to set up a
.com web presence
• Guess what software they
were running on? LAMPSource: http://www.aiteducation.org/2016/07/shared-web-hosting-linux-or-windows/
PHP Applications: CMS, Commerce
Source: https://www.rishabhsoft.com/php-application-development
PHP Frameworks
• A few years ago, there were
several contenders –
CakePHP, Yii, Symfony,
CodeIgniter
• Today: Laravel leads the
pack
• All frameworks share
similar patterns
 MVC framework
 ORM (Object Relational
Mapping)
 Scaffolding (generate basic
application from models)Source: https://www.quora.com/Which-is-the-best-framework-for-PHP
WordPress: Most Popular CMS
• Most popular CMS (Content
Management System)
 Replaced Joomla & Drupal (also PHP)
• Initially started as blog system
• Now also popular e-commerce
platform (with WooCommerce)
 Replacing Magneto (also PHP)
• Open-source, built on PHP. Primarily
runs on LAMP stack
• Initially released in 2003 by Matt
Mullenweg when he was a student
 Now maintained by WordPress
Foundation (non-profit) and Automattic
(for-profit private company)
Source: https://thenextweb.com/dd/2018/03/05/30-of-the-web-now-runs-on-wordpress/
WordPress Screenshot

More Related Content

What's hot

ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
David Bergunder
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Servers
webhostingguy
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
litbbsr
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
Barry Jones
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
Yi-Ting Cheng
 
Where do I put this data? #lessql
Where do I put this data? #lessqlWhere do I put this data? #lessql
Where do I put this data? #lessql
Ezra Zygmuntowicz
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
Tuenti
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 
Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
ColdFusionConference
 
Save Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command LineSave Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command Line
Shawn Hooper
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in Scala
Amir Karimi
 
Python to go
Python to goPython to go
Python to go
Weng Wei
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
Florent Jaby ヅ
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
Shiju Varghese
 
23 LAMP Stack #burningkeyboards
23 LAMP Stack #burningkeyboards23 LAMP Stack #burningkeyboards
23 LAMP Stack #burningkeyboards
Denis Ristic
 
Web development post io2016
Web development post io2016Web development post io2016
Web development post io2016
Filip Bruun Bech-Larsen
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
Aurimas Niekis
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web Developer
Rob Vesse
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
asim78
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
Ortus Solutions, Corp
 

What's hot (20)

ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Servers
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
Where do I put this data? #lessql
Where do I put this data? #lessqlWhere do I put this data? #lessql
Where do I put this data? #lessql
 
Tuenti Release Workflow
Tuenti Release WorkflowTuenti Release Workflow
Tuenti Release Workflow
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
 
Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
 
Save Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command LineSave Time by Managing WordPress from the Command Line
Save Time by Managing WordPress from the Command Line
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in Scala
 
Python to go
Python to goPython to go
Python to go
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
 
23 LAMP Stack #burningkeyboards
23 LAMP Stack #burningkeyboards23 LAMP Stack #burningkeyboards
23 LAMP Stack #burningkeyboards
 
Web development post io2016
Web development post io2016Web development post io2016
Web development post io2016
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHP
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web Developer
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
 

Similar to PHP, LAMP Stack & WordPress

PHP
PHPPHP
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
Jin Castor
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
shanmukhareddy dasi
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
Siddique Ibrahim
 
Php
PhpPhp
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemet
Apurva Tripathi
 
Xampp Ppt
Xampp PptXampp Ppt
Xampp Ppt
guestb4b8d8e
 
Php unit i
Php unit i Php unit i
Php unit i
prakashvs7
 
First steps of programming with php
First steps of programming with phpFirst steps of programming with php
First steps of programming with php
Kanha Sahu
 
Php ppt
Php pptPhp ppt
Php ppt
Sasi Kumar
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Sasi Kumar
 
Unit 1 php_basics
Unit 1 php_basicsUnit 1 php_basics
Unit 1 php_basics
Kumar
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
Sleepy Head
 
Lamp
LampLamp
Lamp
anurag1p
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
Eric Johnson
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
Techsters Web
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
MarianJRuben
 
Training ppt
Training pptTraining ppt
Training ppt
nikita vijay
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1
nhepner
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
Ivo Jansch
 

Similar to PHP, LAMP Stack & WordPress (20)

PHP
PHPPHP
PHP
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
Php
PhpPhp
Php
 
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemet
 
Xampp Ppt
Xampp PptXampp Ppt
Xampp Ppt
 
Php unit i
Php unit i Php unit i
Php unit i
 
First steps of programming with php
First steps of programming with phpFirst steps of programming with php
First steps of programming with php
 
Php ppt
Php pptPhp ppt
Php ppt
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Unit 1 php_basics
Unit 1 php_basicsUnit 1 php_basics
Unit 1 php_basics
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Lamp
LampLamp
Lamp
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
 
Training ppt
Training pptTraining ppt
Training ppt
 
Web technologies lesson 1
Web technologies   lesson 1Web technologies   lesson 1
Web technologies lesson 1
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 

More from Suman Srinivasan

Data science and Artificial Intelligence
Data science and Artificial IntelligenceData science and Artificial Intelligence
Data science and Artificial Intelligence
Suman Srinivasan
 
My PhD thesis defense presentation
My PhD thesis defense presentationMy PhD thesis defense presentation
My PhD thesis defense presentation
Suman Srinivasan
 
My PhD Thesis
My PhD Thesis My PhD Thesis
My PhD Thesis
Suman Srinivasan
 
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Suman Srinivasan
 
OSGi summary
OSGi summaryOSGi summary
OSGi summary
Suman Srinivasan
 
ActiveCDN on NetServ
ActiveCDN on NetServActiveCDN on NetServ
ActiveCDN on NetServ
Suman Srinivasan
 
Suman's PhD Candidacy Talk
Suman's PhD Candidacy TalkSuman's PhD Candidacy Talk
Suman's PhD Candidacy Talk
Suman Srinivasan
 
7DS Version 1
7DS Version 17DS Version 1
7DS Version 1
Suman Srinivasan
 
BonAHA framework - Lab presentation
BonAHA framework - Lab presentationBonAHA framework - Lab presentation
BonAHA framework - Lab presentation
Suman Srinivasan
 
BonAHA framework - IEEE CCNC 2009
BonAHA framework - IEEE CCNC 2009BonAHA framework - IEEE CCNC 2009
BonAHA framework - IEEE CCNC 2009
Suman Srinivasan
 

More from Suman Srinivasan (10)

Data science and Artificial Intelligence
Data science and Artificial IntelligenceData science and Artificial Intelligence
Data science and Artificial Intelligence
 
My PhD thesis defense presentation
My PhD thesis defense presentationMy PhD thesis defense presentation
My PhD thesis defense presentation
 
My PhD Thesis
My PhD Thesis My PhD Thesis
My PhD Thesis
 
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
 
OSGi summary
OSGi summaryOSGi summary
OSGi summary
 
ActiveCDN on NetServ
ActiveCDN on NetServActiveCDN on NetServ
ActiveCDN on NetServ
 
Suman's PhD Candidacy Talk
Suman's PhD Candidacy TalkSuman's PhD Candidacy Talk
Suman's PhD Candidacy Talk
 
7DS Version 1
7DS Version 17DS Version 1
7DS Version 1
 
BonAHA framework - Lab presentation
BonAHA framework - Lab presentationBonAHA framework - Lab presentation
BonAHA framework - Lab presentation
 
BonAHA framework - IEEE CCNC 2009
BonAHA framework - IEEE CCNC 2009BonAHA framework - IEEE CCNC 2009
BonAHA framework - IEEE CCNC 2009
 

Recently uploaded

快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
dtagbe
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
GNAMBIKARAO
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
Infosec train
 

Recently uploaded (11)

快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
 

PHP, LAMP Stack & WordPress

  • 1. PHP, LAMP* Stack & WordPress *LAMP = Linux, Apache, MySQL, PHP Aug 28, 2018
  • 2. Agenda • Introduction to PHP & LAMP stack • How PHP & LAMP took the world (at least, shared hosting) by storm  Why PHP is widely used despite being among the “most disliked” languages! • PHP applications & frameworks; Laravel • WordPress (and why it powers 31% of the Internet / websites) • Demo: installing LAMP, some simple PHP code, installing WordPress
  • 3. PHP • PHP: Hypertext Preprocessor  Open source loves recursive acronyms! Other examples: GNU, cURL, RPM, WINE  Used to be: Personal Home Page Tools (1994-1997) • Developed by Rasmus Lerdorf in 1994 • PHP Versions  Initally not meant to be a separate language: worked with CGI (Common Gateway Interface) scripts / binaries to generate dynamic web pages  PHP 3 & 4 (1997): re-write of initial PHP. Powered by new Zend Engine.  PHP 5 (2004): support for OOP & classes, PDO (Data Objects), Windows support!  Namespaces (backported from PHP 6 which was never released)  PHP 7 (2014): mainly performance enhancements, reportedly up to 2x  Multiple legacy features removed (PHP 4 constructor style, <? ?> delimiters)
  • 4. Perl / Python • P in LAMP stack could also refer to Perl or Python • Won’t be discussing those today • Very different from PHP! • Examples of directory iteration in Perl (top) & Python (bottom) • Today  Perl used to be go-to script for DevOps and sysadmins; now less popular  Python has become Swiss army knife: used in production systems, DevOps scripts, automation, production systems & even web frameworks
  • 5. PHP Basics • Early PHP (3 and 4) was similar to C – actually used C function names • PHP 5+ introduced OOP and namespaces • Embedded in HTML documents using <?php and ?>. File saved as .php, parsed server-side (web server with PHP module) and sent as HTML.  Similar to ASP.Net, JSP, etc • Drop / copy your PHP files into a web server, and they just run. No compilation, build, etc.  Deployment = test locally, commit to git, SSH into server, “git pull”
  • 6. Google Trends: PHP, Python, Perl
  • 7. Most Disliked Languages 2017 Stackoverflow Survey https://stackoverflow.blog/2017/10/31/disliked-programming-languages/
  • 8. LAMP Stack • LAMP = Linux, Apache, MySQL, PHP (or Perl or Python)  Linux = OS  Apache = Web Server  MySQL = Database  PHP = Language • WAMP = Windows, Apache, MySQL, PHP  MAMP = Mac OS, Apache, … • MEAN = MongoDB, Express.js, AngularJS, Node.js • WISA (!) = Windows, IIS, SQL Server, ASP.Net Source: https://www.freelancinggig.com/blog/2017/08/04/lamp-stack-vs-wisa-stack-best-startup/
  • 9. Shared Hosting & PHP’s Popularity • Made popular by GoDaddy • Bunch of contenders: DreamHost, HostGator, 1and1, Bluehost, SiteGround • Web presence at low prices; multiple domains on 1 server  $5-$10 a year for a domain  $3-$10 a month for hosting = $36 - $60 a year • Small businesses flocked towards them to set up a .com web presence • Guess what software they were running on? LAMPSource: http://www.aiteducation.org/2016/07/shared-web-hosting-linux-or-windows/
  • 10. PHP Applications: CMS, Commerce Source: https://www.rishabhsoft.com/php-application-development
  • 11. PHP Frameworks • A few years ago, there were several contenders – CakePHP, Yii, Symfony, CodeIgniter • Today: Laravel leads the pack • All frameworks share similar patterns  MVC framework  ORM (Object Relational Mapping)  Scaffolding (generate basic application from models)Source: https://www.quora.com/Which-is-the-best-framework-for-PHP
  • 12. WordPress: Most Popular CMS • Most popular CMS (Content Management System)  Replaced Joomla & Drupal (also PHP) • Initially started as blog system • Now also popular e-commerce platform (with WooCommerce)  Replacing Magneto (also PHP) • Open-source, built on PHP. Primarily runs on LAMP stack • Initially released in 2003 by Matt Mullenweg when he was a student  Now maintained by WordPress Foundation (non-profit) and Automattic (for-profit private company) Source: https://thenextweb.com/dd/2018/03/05/30-of-the-web-now-runs-on-wordpress/