Checking Composer version in Command Line Interface

Operating System : Ubuntu 16.04 (Xenial Xerus)

Composer : 1.2.0

What is the usage of a composer ?. Composer in the context of PHP programming language is considered as a dependency manager for PHP which is helping PHP developers or programmers to develop web application based on sophisticated and more complex framework such as Laravel, Symfony, etc.

Continue reading “Checking Composer version in Command Line Interface”

Creating Laravel 5 Web Application Project using Composer

Operating System : Ubuntu 16.04 (Xenial Xerus)
Laravel : Laravel 5

To be able to create a simple Larvel project, here is the thing which is actually needed based on my trial and error :

  1. If you are installing or creating Laravel based web application from composer, off course you need a composer.
  2. Make sure that your user can create folder which is used for the Laravel web application based. In my opinion, since I use /var/www/html as the main or default root directory since I used Apache Web Server and the owner of that directory itself is www-data in this operating system, I have to register my username which is I currently login in order for the username itself is a member of www-data group so that I have enough privileges to write or to create a Laravel based web application project. To check whether the user is already part of the group or not, I try to execute the following command :
id username

Continue reading “Creating Laravel 5 Web Application Project using Composer”

Changing PHP Laravel Web-based Application URL

URL Laravel-based Web Application’s Modification

Main Problem :

There has been a request which is made to change URL of a Laravel-based Web Application. We will lay out the scenarios as follows :

We have a main server which can be accessed public or from the internet connection in general as follows :

http://www.domain.com

The domain name above is a fake one which is not the actual name used, it is just for an example. And we have another application which is a Laravel-based Web Application which has already been set up in another server but cannot be accessed directly from the internet since it is not available in public address.

We are using Apache Webserver ProxyPass feature to access the Laravel-based Web Application which is currently available in the following address :

http://www.domain.com/old_url_laravel_app

And now are we going to change it to another URL Address for an example :

http://www.domain.com/new_url_laravel_app

Below is a diagram describing the situation above :

This is the existing condition which is now have already implemented :

Existing Implementation Diagram of accessing web-based application Laravel from other Server using Apache Webserver’s ProxyPass feature

Continue reading “Changing PHP Laravel Web-based Application URL”

Cannot Access MySQL because Alfresco’s log consumed space storage

MySQL Database cannot be accessed because the Server’s storage is exhausted.

One of the application crashed and was displaying error messages. One of the most highlighted error message is that the application itself cannot connect to MySQL server.

This is step-by-step actions taken to resolve the problem :

  1. To be able to resolve the problem, we have to check it first by logging in to the database server which is represented by the IP Address of the database server itself.

Connect with the following command :

ssh username@IP_Address_Database_Server
  1. Try to log in to MySQL Console by executing the following command :
mysql -uroot -p

There is an error when we are trying to connect to MySQL console which the error itself can be specified as follows :

Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)

It means that we cannot connect to MySQL Server but before we go further, we have to check the status of MySQL service as follows :

systemctl status mysql.service

It can be shown as follows :

Continue reading “Cannot Access MySQL because Alfresco’s log consumed space storage”

Removing database migration script file in PHP Laravel 5

Removing database migration script file in Laravel 5

Programming Language : PHP

Framework : Laravel 5

Operating System : Ubuntu 16.04 (Xenial Xerus). It is working for operating sytem which has command line interface

When we try to develop a web-based application with PHP programming language with Laravel Framework, we can use PHP artisan tool to generate script which can be used to generate database.

But sometime, we also need to remote the script and also the status of that database migration script file laravel project database migrations’ table.

  1. Check the migration status

We actually can check it by executing the command as part of utility that is provided by Laravel which is the PHP artisan. Just type the following command :

php artisan:migrate status

For an example:

Continue reading “Removing database migration script file in PHP Laravel 5”

Checking your database migration status in PHP Laravel 5

Checking your database migration status script file in PHP Laravel 5

Programming Language : PHP

Framework : Laravel 5

Operating System : Ubuntu 16.04 (Xenial Xerus). It is working for operating sytem which has command line interface

If you want specifically generate table by using php artisan utility provided in Laravel, we can use the following command :

php artisan migrate:status

The above command must be executed in the root folder of Laravel project. The following is the example in real-life case :

Continue reading “Checking your database migration status in PHP Laravel 5”

Error Setting Password in MySQL Database using the PASSWORD utility

Error Setting Password in MySQL Database using the PASSWORD utility

Database : MySQL

Version : 5.7.12

Operating System : Any Operating System which has MySQL database running.

This article discuss about the error which is faced when using PASSWORD function in MySQL database.

First of all, check the version of your MySQL database version using the following command :

  1. Login to your MySQL Console as shown below :

Continue reading “Error Setting Password in MySQL Database using the PASSWORD utility”