SlideShare una empresa de Scribd logo
1 de 26
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

Más contenido relacionado

La actualidad más candente

LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in detailsMax Klymyshyn
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flaskjuzten
 
Power Shell and Sharepoint 2013
Power Shell and Sharepoint 2013Power Shell and Sharepoint 2013
Power Shell and Sharepoint 2013Mohan Arumugam
 
Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010Binh Nguyen
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for BeginnersJason Davies
 
Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flaskJeetendra singh
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90minsLarry Cai
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitJames Fuller
 
PloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyondPloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyondDavid Glick
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial之宇 趙
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics PresentationShrinath Shenoy
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using DjangoNathan Eror
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to djangoIlian Iliev
 
Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Tom Brander
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flaskJim Yeh
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwalratneshsinghparihar
 
Basic Crud In Django
Basic Crud In DjangoBasic Crud In Django
Basic Crud In Djangomcantelon
 
Flask Introduction - Python Meetup
Flask Introduction - Python MeetupFlask Introduction - Python Meetup
Flask Introduction - Python MeetupAreski Belaid
 

La actualidad más candente (20)

LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in details
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
 
Power Shell and Sharepoint 2013
Power Shell and Sharepoint 2013Power Shell and Sharepoint 2013
Power Shell and Sharepoint 2013
 
Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
 
Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flask
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90mins
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnit
 
PloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyondPloneNG: What's new in Plone 4.2, 4.3, and beyond
PloneNG: What's new in Plone 4.2, 4.3, and beyond
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using Django
 
Presentation laravel 5 4
Presentation laravel 5 4Presentation laravel 5 4
Presentation laravel 5 4
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
 
Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Django, What is it, Why is it cool?
Django, What is it, Why is it cool?
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flask
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwal
 
Basic Crud In Django
Basic Crud In DjangoBasic Crud In Django
Basic Crud In Django
 
Flask Introduction - Python Meetup
Flask Introduction - Python MeetupFlask Introduction - Python Meetup
Flask Introduction - Python Meetup
 

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

Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Kaan Aslandağ
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlinkusha kannappan
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xamppInstalling php and my sql locally using xampp
Installing php and my sql locally using xampppeyman Ghader Kurehpaz
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Boxguest34a3a419
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows BoxJayanta Dash
 
APACHE
APACHEAPACHE
APACHEARJUN
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011Alfred Ayache
 
Wordpress on Windows
Wordpress on WindowsWordpress on Windows
Wordpress on WindowsJosh Holmes
 
Apache windows
Apache windowsApache windows
Apache windowsmexxixxo
 

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

Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xamppInstalling php and my sql locally using xampp
Installing php and my sql locally using xampp
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
APACHE
APACHEAPACHE
APACHE
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil ConferencePhalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Manual 5
Manual 5Manual 5
Manual 5
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Wordpress on Windows
Wordpress on WindowsWordpress on Windows
Wordpress on Windows
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
Lumen
LumenLumen
Lumen
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Apache windows
Apache windowsApache windows
Apache windows
 

Más de MasterCode.vn

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

Más de MasterCode.vn (20)

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

Último

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Último (20)

MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

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