Hi, I am Masso Dasuki!

Hello, I'm incharge here !
I am Software Engineer graduate of Universiti Teknologi Malaysia, Skudai Johor Bahru.
I want to share my little knowledge & Please enjoy .





Update and Upgrade Ubuntu

$ sudo apt-get update
$ sudo apt-get upgrade


Start out with the basics – Apache, MySQL and PHP + extensions

$ sudo apt-get install mysql-server mysql-client apache2 php5 php5-cli
libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-
imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc
php5-xsl php5-json php5-dev libpcre3-dev


Download Composer

$ sudo curl -s$ https://getcomposer.org/installer | php

Install Laravel

$ sudo php composer.phar global require "laravel/laravel"
change directory to directory for laravel project

$ cd /var/www/html
$ sudo php ~/composer.phar create-project --prefer-dist laravel/laravel ProjectName

To give permision for server to access folder, then execute below command on terminal :

$ sudo chown -R www-data:www-data /var/www/html
$ sudo chown -R www-data:www-data /var/www/html/ProjectName/storage
$ sudo chown -R www-data:www-data /var/www/html/ProjectName/vendor


This error might happen :
500 internal server error

To fix this error change directory to project directory. Execute below command on terminal:


$ cd /var/www/html/
$
sudo chmod 755 -R ProjectName
$ sudo chmod -R o+w ProjectName/storage


Afterward your project can be open at https://yourlocalhost/ProjectName/public

Unfortunately to make Laravel really function for routing we need to make virtualhost for laravel. I will update later.

Reference :
1.
https://snippets.khromov.se/debian-lamp-stack-in-one-command/2. https://stackoverflow.com/questions/31543175/getting-a-500-internal-server-error-on-laravel-
5-ubuntu-14-04
3. https://www.youtube.com/watch?v=7mWZLPdE2B4 

Linux + Apache + MySql + PHP + Laravel


$ wget --no-check-certificate https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
$ tar -xzf Python-2.7.11.tgz
$ cd Python-2.7.11 ./configure make
$ sudo make install





Source : http://stackoverflow.com/questions/6630873/how-to-download-python-from-command-line

Installing python 2.7.11 in Linux

This problem happen as I copy and paste other source code from other developer .


In Coldbox, we need to initialize as we insert something new . Hence go to the home page :


Click on Execute .

After you click on the execute the page can be open .


HandlerService.EventHandlerNotRegisteredException - Coldbox ColdFusion

I am not really sure this problem, but it seem problem with entity .  Because we are using ORM to interact with database we need to create orm-entity using CommandBox .

coldbox create orm-entity entityName=User primaryKey=id, properties=name,email,password --activeEntity



--activeEntity is most important to write because it will activate the entity ..


Make sure you don't have any space while write for properties. He will get dizzy if you put space like this properties=name, email, <space> password  <-- this is wrong .








ColdBox - The parameter entityName to function is required but was not passed in.


coldbox create model name=Users --open

Create the name="???" same as the database name . 

Create Model using CommandBox in ColdBox Framework










Above is coding that need to be add in Appliction.cfc to enable the application to interact using ORM .

Enable ORM ColdFusion Coldbox Framework


Open Lucee in ColdBox

After we right click on ColdBox icon, there will be a pop-up show few menus . Choose "Open Server Admin".



A browser will open the browser directing to the Lucee Server Admin. For the first time user, you need to put your password.



Create new datasource 


For example
Then click create !


Datasource configuration .
Make sure your put valid Host/Server , Database( inside MySql), Username and Password . Then your database name must already inside the MySQL. We are not creating new database but actually directing to MySql database. 


Verify your datasource 

Lastly, verify your datasource . After you choose datasource name .. click verify . 









Setup Datasource in ColdBox + Lucee !