23.9 C
Texas

How to install CakePHP in Windows 10.

CakePHP is a free and open-source web application development framework written in PHP. Additionally, it is built on the concepts of Ruby on rails. In other words, it is a base content that developers use to design web pages of all kinds. Like Ruby On Rails, CakePHP makes it easier for the user to interact with the database through the use of ActiveRecord. It also makes use of the Model View Controller pattern. The main objective of this framework is to work in a structured way, fast and without loss of flexibility. Being one of the most robust frameworks, let’s see how to install CakePHP in Windows 10.

Prerequisites

In order to install this framework, it is imperative to have the following installed:

  • An HTTP server. It can be Nginx, Microsoft IIS or Apache. Here in osradar.com we show you how to install Apache in Windows 10.
  • PHP 5.6.0 or greater. If you want to know how to install PHP 7.40, please read our tutorial.
  • A database storage engines. For more information about database managers, check out our post about MySQL in Windows 10.
  • Composer. If you want to know how to install it, please check our post.

Enabling the necessary extensions in PHP

Not only is it necessary to have PHP installed, it is also indispensable to have the following extensions enabled:

  • Mbstring PHP extension
  • Intl PHP extension

Depending on the installation path, PHP extensions are located in this folder C:\php\ext.

Location of the extensions in PHP
Location of the extensions in PHP
- Advertisement -

However, the fact that the extensions are present in the ext folder only means that you don’t have to download or compile them. To enable them, you need to edit the PHP.ini file. With this intention go to the following path: C:\php. Once there, select the file and open it with your favorite text editor.

Select the PHP.ini file
Select the PHP.ini file

Once the file is open, you only have to scroll to the list of extensions. Additionally, you can notice that the file contains all the extensions that are in the program folder. Furthermore, the extensions that are currently enabled, have a ; before the name. Therefore, in order to enable any extension, just delete the ; in the line. With this in mind, select mbstring and intl to delete the ; and enable them. Then save the file to set the changes.

Enabling PHP extensions
Enabling PHP extensions

Installing a new CakePHP project.

To install and create a new CakePHP project, please open a Command Prompt from the following path: C:\Apache24\htdocs. Next, execute the following command:

 composer create-project --prefer-dist cakephp/app my_app_name 

Please remember to replace my_app_name with the name you assigned to the project.

Conclusion

Ultimately we’ve seen how to install CakePHP on Windows 10. Its modular design allows designers and developers to work together, as well as quickly prototype. That’s it for now. See you soon!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article