SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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
 

Dernier

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
 
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
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
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
 
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
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
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
 
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
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
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
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Dernier (20)

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
 
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
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
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
 
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
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
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
 
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
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
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
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

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