Monthly Archives: November 2014

Install Laravel via Composer on Ubuntu

Laravel is a modren, open source PHP framework for web development. It provides an easy, elegant way to easily get fully functional web application running quickly.

First, we will be needing to install composer and for this you can check my previous article Intall Composer on Ubnutu.

After installing composer, next you have to user composer to install laravel.


Lets say, we want to install laravel inside /var/www/laravel directory. To install the latest version of Laravel, you can type following code in your terminal:

if you want to install specific version 4.2 of laravel then type the following:

composer create-project laravel/laravel /var/www/laravel 4.2

Happy Coding


Install Composer on Ubuntu

Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.

Composer requires PHP 5.3.2+ to run. A few sensitive php settings and compile flags are also required, but the installer will warn you about any incompatibilities.

Open a terminal and move to a directory where you have write access (like your home directory) and then download and run the installer script from the Composer project:

This will create a file called composer.phar in your home directory. This is a PHP archive, and it can be run from the command line.

We want to install it in a globally accessible location though. Also, we want to change the name to composer (without the file extension). We can do this in one step by typing:

Now, type composer in your command line to see the result.

and you can also check the installed version of the composer by typing:

Happy Coding!

Copy file using command line in Ubuntu

Although Ubuntu provides a GUI but sometimes we need to use command line to perform some tasks.

To copy file using command line, you have to use cp command, with this command you can copy files and directories.

Following syntax is used to copy files via terminal:

You can check the cp command detail via typing the following command in the Terminal:


Example 1: Copy file.txt to /tmp directory

Open the Terminal and type the following command:

Example 2: Copying multiple files (file.txt, file2.txt, file3.txt) to tmp directory

In command line type the following command:



Increase File Import Size in phpmyadmin

When we install phpmyadmin for the first time, it comes with default settings which are more than enough to carry out the normal tasks, but sometimes we do need to import files that exceeds the default limit and we getting max upload size error.

In order to solve this issue we can make changes to the php.ini file and overwrite the default settings to our preferred ones.

First, locate the php.ini file:

In windows (if wamp installation directory is C) you can find it:

In Ubuntu you can find it:

Once you have opened php.ini file in your favourite editor then find the following lines:

and change it to:

now that you are done with the changes, all you have to do is restart the apache.

Happy Coding!