SlideShare a Scribd company logo
Installing CakePHP
Jill Gundersen
Installing CakePHP
 CakePHP Can Be Run on Any OS


I will cover installation on the following machines






Linux command line
Linux with NetBeans IDE
Window using XAMPP
Windows with NetBeans IDE
Windows with IIS

 URL Alteration



In each OS installation scenario I will also cover how to make a pretty URL
http://catalog


(instead of using http://localhost/catalog)
CakePHP Requirements
 PHP Version


5.2.8 or Higher

 Database


MySQL, PostgreSQL, Microsoft SQL Server, SQLite


MySQL with phpMyAdmin

 Web Server


Apache, IIS
Installing CakePHP on Linux
 Command Line for Our Installation


For this course I will be using the Ubuntu OS, but the process is similar on
other flavors of Linux.
Initial Setup Environment
 Building on the LAMP Stack –
Linux, Apache, MySQL, PHP




Linux
Apache Web Server
MySQL



Make sure you have your username/password handy
Create a database for our course




Catalog

PHP


Version 5.2.8 or higher

 Additionally


Download CakePHP



git://github.com/cakephp/cakephp.git
https://github.com/cakephp/cakephp/zipball/2.3.6
Configure CakePHP
 Create a Folder for Our New CakePHP Site


Move the CakePHP you downloaded into this folder



I like to keep my individual web sites under a WebSites folder
etc. /home/<username>/WebSites/Catalog

 Change the Permissions on the CakePHP app/tmp Folder


chmod 777 -R tmp

 Alter Two Files in the CakePHP app/config Folder



database.php.default
core.php
Configure Apache Web Server
 Alter the ‘etc/hosts’ File


Add Catalog after ‘localhost’


Make sure there is a space between the two

 Create a New VirtualHost File


Located inside the /etc/apache2/sites-available


Hint: Copy the default file and rename that to be Catalog

 Enable the New Site


a2ensite Catalog

 Reload Apache


This allows Apache to recognize the changes we just made to the
configuration
Install CakePHP with NetBeans
 Installation of CakePHP with the NetBeans IDE


Most IDEs will work for development, but NetBeans has a nice CakePHP
plugin that helps with installation and setup of CakePHP.


As a bonus it also has code completion.
Initial Setup Environment
 Building on the LAMP Stack –
Linux, Apache, MySQL, PHP




Linux
Apache Web Server
MySQL



Make sure you have your username/password handy
Create a database for our course




Catalog

PHP


Version 5.2.8 or higher

 Additionally


Download and Install NetBeans IDE


http://www.netbeans.org
NetBeans Magic
 CakePHP Plugin


Using NetBeans plugin manager, select and install the CakePHP plugin

 Create a New Project


Using the new framework template, create a new CakePHP Project


CatalogTest
Configure Apache Web Server
 Alter the ‘etc/hosts’ File


Add CatalogTest

 Create a New VirtualHost File


Located inside the /etc/apache2/sites-available

 Enable the New Site


a2ensite CatalogTest

 Reload Apache


This will get apache to recognize the changes we have made to the
VirtualHosts folder
Installing CakePHP on Windows Using XAMPP
 Install the XAMPP Application


Includes




Apache Web Server
MySQL
PHP

 Install CakePHP in Our New XAMPP Environment on Windows
Initial Setup Environment
 Windows OS


I will be using Windows 7

 Download XAMPP Installer Version


You can find the latest from



http://www.apachefriends.org/en/xampp.html
Download the version with the Windows Installer

 Download CakePHP


https://github.com/cakephp/cakephp/zipball/2.3.6
Installing XAMPP
 Default Program Options




You can uncheck any programs you don’t
want to install.
Make sure that you leave phpMyAdmin,
and MySQL checked.

 Install off of the C: Drive


C:xampp

 Start Apache and MySQL


You can minimize the control panel and it
will still run in the background.
Configure CakePHP
 Create a folder for our new CakePHP site


Move the CakePHP you downloaded into this folder



I like to keep my individual web sites under a WebSites folder
etc. C:PluralsightWebSitesCatalog

 Alter two files in the CakePHP app/config folder



database.php.default
core.php
Configure XAMPP
 Alter the ‘C:WindowsSystem32driversetchosts’ file


Add Catalog and localhost entries


http://Catalog

 Add a VirtualHost Entry


Located inside the C:xamppapacheconfextrahttpd-vhosts.conf

 Restart Apache


Open up the XAMPP control panel and stop and then start Apache
Install CakePHP with NetBeans
 Installation of CakePHP with the NetBeans IDE


Most IDEs will work for development, but NetBeans has a nice CakePHP
plugin that helps with installation and setup of CakePHP.


As a bonus it also has code completion.
Initial Setup Environment
 Windows OS


I will be using Windows 7

 XAMPP


Downloaded and installed

 NetBeans


Downloaded and installed
NetBeans Magic
 CakePHP Plugin


Using NetBeans plugin manager, select and install the CakePHP plugin

 Create a New Project


Using the new framework template, create a new CakePHP Project


CatalogTest
Configure XAMPP
 Alter the ‘C:WindowsSystem32driversetchosts’ file


Add CatalogTest

 Add a VirtualHost Entry


Located inside the C:xamppapacheconfextrahttpd-vhosts.conf

 Restart Apache


Open up the XAMPP control panel and stop and then start Apache
CakePHP with Windows IIS Server
 No More Software, please


For those that want to stick with the IIS server and not have to install XAMPP
this section is for you.
Initial Setup
 Web Platform Installer


Below is a list of items you will need in order to run CakePHP on your IIS
system







IIS (Express)
IIS Manager
PHP (latest version 5.4 <)
PHP Manager for IIS
MySQL Server 5.1 (or most recent)
URL Rewrite 2.0 (this is to handle the rewrite rules that CakePHP utilizes)
IIS Configuration
 Create New Site


Catalog (choose the correct local path)

 Add a New Default Document


index.php

 PHP Manager




Make sure that the suggested optimizations are in place.
Check the latest version that it is greater than 5.2.8
Check to make sure the phpinfo() file runs


This means that php was installed succesfully
URL Rewrite
 URL Rewrite Not Natively Handled


IIS does not handle the rewriting of rules as found in the Apache web server.

 Create a web.config


This file should reside in the base folder


Catalog/web.config

 Copy and Paste



Copy and past the necessary rules for the CakePHP site into the web.config.
http://alturl.com/to9z4 (CakePHP’s URL Rewrite Page)
Common Issues & Mistakes
 Below is List of Common Installation Problems


Database won’t connect



Did you create the database?
Did you create new user?




Did you type the user name and password correctly?




Did you give that user permissions for the new database?
Use the root/password to see if that will connect properly. If it does then there is
something wrong with your username

My styles are not showing


IIS Server





Did you install the web.config with the xml rules?
Did you install URL Rewrite for your IIS server?

Apache


Did you set the “AllowOverride” to be “All” in your VirtualHost?
Summary
 Installed CakePHP on…






Linux
Linux with NetBeans
Windows
Windows with NetBeans
Windows with IIS Server

 URL/Virtual Host


Set up on each Install for pretty URLs

More Related Content

What's hot (20)

KEY
LvivPy - Flask in details
Max Klymyshyn
 
PDF
Quick flask an intro to flask
juzten
 
PPTX
Power Shell and Sharepoint 2013
Mohan Arumugam
 
PPTX
Introduction to windows power shell in sharepoint 2010
Binh Nguyen
 
ODP
Django for Beginners
Jason Davies
 
PPTX
Build restful ap is with python and flask
Jeetendra singh
 
PPT
Learn flask in 90mins
Larry Cai
 
PDF
Fighting Fear-Driven-Development With PHPUnit
James Fuller
 
PDF
PloneNG: What's new in Plone 4.2, 4.3, and beyond
David Glick
 
PDF
Django Introduction & Tutorial
之宇 趙
 
PDF
Behaviour Driven Development con Behat & Drupal
sparkfabrik
 
PPTX
Web development with django - Basics Presentation
Shrinath Shenoy
 
PDF
Building a Dynamic Website Using Django
Nathan Eror
 
ODP
Presentation laravel 5 4
Christen Gjølbye Christensen
 
PDF
Introduction to django
Ilian Iliev
 
PPT
Django, What is it, Why is it cool?
Tom Brander
 
PDF
Web develop in flask
Jim Yeh
 
PPTX
Django app deployment in Azure By Saurabh Agarwal
ratneshsinghparihar
 
PDF
Basic Crud In Django
mcantelon
 
PDF
Flask Introduction - Python Meetup
Areski Belaid
 
LvivPy - Flask in details
Max Klymyshyn
 
Quick flask an intro to flask
juzten
 
Power Shell and Sharepoint 2013
Mohan Arumugam
 
Introduction to windows power shell in sharepoint 2010
Binh Nguyen
 
Django for Beginners
Jason Davies
 
Build restful ap is with python and flask
Jeetendra singh
 
Learn flask in 90mins
Larry Cai
 
Fighting Fear-Driven-Development With PHPUnit
James Fuller
 
PloneNG: What's new in Plone 4.2, 4.3, and beyond
David Glick
 
Django Introduction & Tutorial
之宇 趙
 
Behaviour Driven Development con Behat & Drupal
sparkfabrik
 
Web development with django - Basics Presentation
Shrinath Shenoy
 
Building a Dynamic Website Using Django
Nathan Eror
 
Presentation laravel 5 4
Christen Gjølbye Christensen
 
Introduction to django
Ilian Iliev
 
Django, What is it, Why is it cool?
Tom Brander
 
Web develop in flask
Jim Yeh
 
Django app deployment in Azure By Saurabh Agarwal
ratneshsinghparihar
 
Basic Crud In Django
mcantelon
 
Flask Introduction - Python Meetup
Areski Belaid
 

Similar to 2 introduction-php-mvc-cakephp-m2-installation-slides (20)

PDF
Manual 5
arifhossen
 
PPT
Intro to CakePHP 1.3
Adam Culp
 
PDF
5503 cake php-tutorial-no-1-from-ibm
balajipala
 
PDF
Cakephp manual-11
Aditya Pandey
 
PPTX
Ei cakephp
eiei lay
 
PPTX
Cakeph pppt
Wizard Rider
 
PPTX
Cake php
Jyotisankar Pradhan
 
PDF
Cakephp tutorial
HarikaReddy115
 
PPTX
cakephp UDUYKTHA (1)
Varsha Krishna
 
PPTX
Trusted PHP Development Services in the USA
TechnoProfiles Pvt. Ltd.
 
PDF
Know about cake php framework with vertexplus
VertexPlus Softwares Pvt. Ltd.
 
KEY
CakePHP 2.0 - PHP Matsuri 2011
Graham Weldon
 
PDF
Cake PHP Training Institute, Ghaziabad
Softcrayons Tech Solutions
 
PDF
Ch ch-changes cake php2
markstory
 
PDF
Building Restful Web App Rapidly in CakePHP
Edureka!
 
PDF
Rapid Development With CakePHP
Edureka!
 
PPTX
CakePHP, cakePHP development Company
NetConnectWeb
 
PPT
Synapseindia reviews sharing intro cakephp
SynapseindiaComplaints
 
PDF
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
JPLoft Solutions
 
PDF
Introduction to CakePHP
mohamedsamirgalal
 
Manual 5
arifhossen
 
Intro to CakePHP 1.3
Adam Culp
 
5503 cake php-tutorial-no-1-from-ibm
balajipala
 
Cakephp manual-11
Aditya Pandey
 
Ei cakephp
eiei lay
 
Cakeph pppt
Wizard Rider
 
Cakephp tutorial
HarikaReddy115
 
cakephp UDUYKTHA (1)
Varsha Krishna
 
Trusted PHP Development Services in the USA
TechnoProfiles Pvt. Ltd.
 
Know about cake php framework with vertexplus
VertexPlus Softwares Pvt. Ltd.
 
CakePHP 2.0 - PHP Matsuri 2011
Graham Weldon
 
Cake PHP Training Institute, Ghaziabad
Softcrayons Tech Solutions
 
Ch ch-changes cake php2
markstory
 
Building Restful Web App Rapidly in CakePHP
Edureka!
 
Rapid Development With CakePHP
Edureka!
 
CakePHP, cakePHP development Company
NetConnectWeb
 
Synapseindia reviews sharing intro cakephp
SynapseindiaComplaints
 
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
JPLoft Solutions
 
Introduction to CakePHP
mohamedsamirgalal
 
Ad

More from MasterCode.vn (20)

PDF
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
MasterCode.vn
 
PDF
Why apps-succeed-wpr-mastercode.vn
MasterCode.vn
 
PDF
Dzone performancemonitoring2016-mastercode.vn
MasterCode.vn
 
PDF
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
MasterCode.vn
 
PDF
Nghiên cứu về khách hàng mastercode.vn
MasterCode.vn
 
PDF
Lập trình sáng tạo creative computing textbook mastercode.vn
MasterCode.vn
 
PDF
Pd fbuoi7 8--tongquanseo-mastercode.vn
MasterCode.vn
 
PDF
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
MasterCode.vn
 
PDF
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
MasterCode.vn
 
PDF
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
MasterCode.vn
 
PDF
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
MasterCode.vn
 
PDF
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
MasterCode.vn
 
PDF
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
PDF
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
MasterCode.vn
 
Why apps-succeed-wpr-mastercode.vn
MasterCode.vn
 
Dzone performancemonitoring2016-mastercode.vn
MasterCode.vn
 
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
MasterCode.vn
 
Nghiên cứu về khách hàng mastercode.vn
MasterCode.vn
 
Lập trình sáng tạo creative computing textbook mastercode.vn
MasterCode.vn
 
Pd fbuoi7 8--tongquanseo-mastercode.vn
MasterCode.vn
 
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
MasterCode.vn
 
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
MasterCode.vn
 
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
MasterCode.vn
 
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
MasterCode.vn
 
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
MasterCode.vn
 
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
MasterCode.vn
 
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
MasterCode.vn
 
Ad

Recently uploaded (20)

PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
community health nursing question paper 2.pdf
Prince kumar
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 

2 introduction-php-mvc-cakephp-m2-installation-slides

  • 2. Installing CakePHP  CakePHP Can Be Run on Any OS  I will cover installation on the following machines      Linux command line Linux with NetBeans IDE Window using XAMPP Windows with NetBeans IDE Windows with IIS  URL Alteration   In each OS installation scenario I will also cover how to make a pretty URL http://catalog  (instead of using http://localhost/catalog)
  • 3. CakePHP Requirements  PHP Version  5.2.8 or Higher  Database  MySQL, PostgreSQL, Microsoft SQL Server, SQLite  MySQL with phpMyAdmin  Web Server  Apache, IIS
  • 4. Installing CakePHP on Linux  Command Line for Our Installation  For this course I will be using the Ubuntu OS, but the process is similar on other flavors of Linux.
  • 5. Initial Setup Environment  Building on the LAMP Stack – Linux, Apache, MySQL, PHP    Linux Apache Web Server MySQL   Make sure you have your username/password handy Create a database for our course   Catalog PHP  Version 5.2.8 or higher  Additionally  Download CakePHP   git://github.com/cakephp/cakephp.git https://github.com/cakephp/cakephp/zipball/2.3.6
  • 6. Configure CakePHP  Create a Folder for Our New CakePHP Site  Move the CakePHP you downloaded into this folder   I like to keep my individual web sites under a WebSites folder etc. /home/<username>/WebSites/Catalog  Change the Permissions on the CakePHP app/tmp Folder  chmod 777 -R tmp  Alter Two Files in the CakePHP app/config Folder   database.php.default core.php
  • 7. Configure Apache Web Server  Alter the ‘etc/hosts’ File  Add Catalog after ‘localhost’  Make sure there is a space between the two  Create a New VirtualHost File  Located inside the /etc/apache2/sites-available  Hint: Copy the default file and rename that to be Catalog  Enable the New Site  a2ensite Catalog  Reload Apache  This allows Apache to recognize the changes we just made to the configuration
  • 8. Install CakePHP with NetBeans  Installation of CakePHP with the NetBeans IDE  Most IDEs will work for development, but NetBeans has a nice CakePHP plugin that helps with installation and setup of CakePHP.  As a bonus it also has code completion.
  • 9. Initial Setup Environment  Building on the LAMP Stack – Linux, Apache, MySQL, PHP    Linux Apache Web Server MySQL   Make sure you have your username/password handy Create a database for our course   Catalog PHP  Version 5.2.8 or higher  Additionally  Download and Install NetBeans IDE  http://www.netbeans.org
  • 10. NetBeans Magic  CakePHP Plugin  Using NetBeans plugin manager, select and install the CakePHP plugin  Create a New Project  Using the new framework template, create a new CakePHP Project  CatalogTest
  • 11. Configure Apache Web Server  Alter the ‘etc/hosts’ File  Add CatalogTest  Create a New VirtualHost File  Located inside the /etc/apache2/sites-available  Enable the New Site  a2ensite CatalogTest  Reload Apache  This will get apache to recognize the changes we have made to the VirtualHosts folder
  • 12. Installing CakePHP on Windows Using XAMPP  Install the XAMPP Application  Includes    Apache Web Server MySQL PHP  Install CakePHP in Our New XAMPP Environment on Windows
  • 13. Initial Setup Environment  Windows OS  I will be using Windows 7  Download XAMPP Installer Version  You can find the latest from   http://www.apachefriends.org/en/xampp.html Download the version with the Windows Installer  Download CakePHP  https://github.com/cakephp/cakephp/zipball/2.3.6
  • 14. Installing XAMPP  Default Program Options   You can uncheck any programs you don’t want to install. Make sure that you leave phpMyAdmin, and MySQL checked.  Install off of the C: Drive  C:xampp  Start Apache and MySQL  You can minimize the control panel and it will still run in the background.
  • 15. Configure CakePHP  Create a folder for our new CakePHP site  Move the CakePHP you downloaded into this folder   I like to keep my individual web sites under a WebSites folder etc. C:PluralsightWebSitesCatalog  Alter two files in the CakePHP app/config folder   database.php.default core.php
  • 16. Configure XAMPP  Alter the ‘C:WindowsSystem32driversetchosts’ file  Add Catalog and localhost entries  http://Catalog  Add a VirtualHost Entry  Located inside the C:xamppapacheconfextrahttpd-vhosts.conf  Restart Apache  Open up the XAMPP control panel and stop and then start Apache
  • 17. Install CakePHP with NetBeans  Installation of CakePHP with the NetBeans IDE  Most IDEs will work for development, but NetBeans has a nice CakePHP plugin that helps with installation and setup of CakePHP.  As a bonus it also has code completion.
  • 18. Initial Setup Environment  Windows OS  I will be using Windows 7  XAMPP  Downloaded and installed  NetBeans  Downloaded and installed
  • 19. NetBeans Magic  CakePHP Plugin  Using NetBeans plugin manager, select and install the CakePHP plugin  Create a New Project  Using the new framework template, create a new CakePHP Project  CatalogTest
  • 20. Configure XAMPP  Alter the ‘C:WindowsSystem32driversetchosts’ file  Add CatalogTest  Add a VirtualHost Entry  Located inside the C:xamppapacheconfextrahttpd-vhosts.conf  Restart Apache  Open up the XAMPP control panel and stop and then start Apache
  • 21. CakePHP with Windows IIS Server  No More Software, please  For those that want to stick with the IIS server and not have to install XAMPP this section is for you.
  • 22. Initial Setup  Web Platform Installer  Below is a list of items you will need in order to run CakePHP on your IIS system       IIS (Express) IIS Manager PHP (latest version 5.4 <) PHP Manager for IIS MySQL Server 5.1 (or most recent) URL Rewrite 2.0 (this is to handle the rewrite rules that CakePHP utilizes)
  • 23. IIS Configuration  Create New Site  Catalog (choose the correct local path)  Add a New Default Document  index.php  PHP Manager    Make sure that the suggested optimizations are in place. Check the latest version that it is greater than 5.2.8 Check to make sure the phpinfo() file runs  This means that php was installed succesfully
  • 24. URL Rewrite  URL Rewrite Not Natively Handled  IIS does not handle the rewriting of rules as found in the Apache web server.  Create a web.config  This file should reside in the base folder  Catalog/web.config  Copy and Paste   Copy and past the necessary rules for the CakePHP site into the web.config. http://alturl.com/to9z4 (CakePHP’s URL Rewrite Page)
  • 25. Common Issues & Mistakes  Below is List of Common Installation Problems  Database won’t connect   Did you create the database? Did you create new user?   Did you type the user name and password correctly?   Did you give that user permissions for the new database? Use the root/password to see if that will connect properly. If it does then there is something wrong with your username My styles are not showing  IIS Server    Did you install the web.config with the xml rules? Did you install URL Rewrite for your IIS server? Apache  Did you set the “AllowOverride” to be “All” in your VirtualHost?
  • 26. Summary  Installed CakePHP on…      Linux Linux with NetBeans Windows Windows with NetBeans Windows with IIS Server  URL/Virtual Host  Set up on each Install for pretty URLs