Install CakePHP 3 using Composer
Installation of CakePHP 3 somewhat tricky/difficult for newbies. I will give you step by step instructions to install CakePHP 3 on your machine successfully, All you need to do is just follow this tutorial.
Before starting CakePHP 3 installation step by step instructions, Please ensure following things are enabled and installed on your machine.
- You must have PHP 5.4.16 or above installed on your machine.
- mbstring extension and intl extension must be enabled to install CakePHP 3 on your machine.
For XAMPP users, intl extension is installed, but you need to enable extension by uncommenting the following line extension=php_intl.dll in the php.ini file. Once you uncomment the extension=php_intl.dll, then you must restart apache server using XAMPP control panel.
(Note: php.ini file mostly in the following directory C:\xampp\php)
For WAMP users, the intl extension is “activated” by default. But to make it work you have to go to php folder (by default) C:\wamp\bin\php\php{version}, copy all the files that looks like icu*.dll and paste them into the Apache bin directory C:\wamp\bin\apache\apache{version}\bin. Once you done please restart Apache server.
Installing CakePHP 3:
CakePHP 3 uses Composer to install, its dependency components, and does some automatic configuration work for you. So to install CakePHP 3 you must have Composer installed on your machine.
Composer Installation for CakePHP 3:
Composer Installation for windows users is very easy. All you need to do is just download .exe installer file from the Composer site.
Here is the .exe installer link to download Composer-Setup.exe
You can also install the Composer using curl using following command
curl -s https://getcomposer.org/installer | php
Once you successfully installed the Composer, then type composer and press enter in the terminal you will get following response like in the below image.
Install CakePHP 3 using Composer
Before start to download CakePHP 3 using Composer, You must be in htdocs/www folder to start CakePHP 3 download. So change the directory in the terminal using cd command .
cd C:\xampp\htdocs
Now run the following command using your terminal window.
composer create-project --prefer-dist cakephp/app cquiz
It will takes sometime if you installing CakePHP first time using Composer. Second time onwards it takes from cache.
Finally it will ask you to set permission for temp directory and to generate security salt. So please give Y to set the permission and generate security salt.
Now you successfully installed CakePHP 3 on your machine. So go the following URL on your browser to see CakePHP default home page like this.
Finally to add database credentials edit app.php file in the config directory(line no. 200 )
'Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection', 'driver' => 'Cake\Database\Driver\Mysql', 'persistent' => false, 'host' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'smart_quiz', 'encoding' => 'utf8', 'timezone' => 'UTC', 'cacheMetadata' => true, 'quoteIdentifiers' => false, ] ]
Download Premium Only Scripts & 80+ Demo scripts Instantly at just 1.95 USD per month + 10% discount to all Exclusive Scripts
If you want any of my script need to be customized according to your business requirement,
Please feel free to contact me [at] muni2explore[at]gmail.com
Note: But it will be charged based on your customization requirement