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-condition
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”

Generating Table in Laravel with PHP Artisan Migrate

Programming Language                : PHP 7.0

Framework                                    : Laravel 5

Operating System                          : Ubuntu 16.04 (Xenial Xerus)

Generating table for the usage of Laravel project

The purpose of generating table to be used in Laravel project can be achieved by using the utility provided named ‘artisan’ is very easy.  All you have to do is execute the following steps in the Laravel username directory folder as shown below :

  1. Create a migration script
php artisan make:migrations script_migration_name

The example is shown below :

username@hostname:/var/www/html/laravel-project# php artisan make:migration create_project_and_tasks_tables
Created Migration: 2016_07_07_130638_create_file_uploads_table
username@hostname:/var/www/html/laravel_project#

As shown in the above example, the root folder of the Laravel project is in :

/var/www/html/laravel-project.

We have to execute the above command exactly in that path. If you are not sure whether you are in the right path, you can check it with this command to print the currently working directory or you can simply execute the command.

The above command will generate a migration file which exists in folder

Continue reading “Generating Table in Laravel with PHP Artisan Migrate”

List Installed Program in Ubuntu Linux using apt command

Operating System            : Ubuntu 16.04 (Xenial Xerus)

Checking the installed program in Ubuntu

Sometimes based on the command line utilities which can be executed in shell prompt we can list the already installed programs or utilities using apt command. Below is the command which can be used :

Continue reading “List Installed Program in Ubuntu Linux using apt command”