Tag Archives: ubuntu

Ubuntu 14.04 adjust Brightness

First install backlight

Find which video card is installed in your system by typing the following command.

For me it’s intel.

card

Create a configuration file:

and copy the following into the the configuration file:

Save the configuration file.

Now logout and then log back into the system and the brightness control would be working through the function keys.

That’s it. Simple :).

 

Ubuntu How to display PHP error messages

While working on Ubuntu, by default PHP error messages are disabled and while developing web application we need to enable debugging mode to better understand the error instead of blank screen.

Following are the step to solve this:

Step – 1:

Open terminal and type the following command to open the php.ini file

Step – 2:

Find the following line

and replace with following line

Step – 3:

Now restart the Apache so that the new changes will take effect, enter the following command in your terminal

now, you will be able to see PHP error messages in your PHP scripts.

Happy Coding!

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.

Syntax:

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:

OR

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: