Laravel Composer Update Issues at Ubuntu

Apache error “Could not reliably determine the server’s fully qualified domain name”

Open a terminal
Open the /etc/apache2/httpd.conf file:
sudo editor /etc/apache2/httpd.conf
By default, it would be blank. Simply add the following line:
ServerName localhost
Save the file and exit
Restart the server
sudo service apache2 restart
mbstring is missing while composer updating

– laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

for general php versions
sudo apt-get install php-mbstring

for php 5.*
sudo apt-get install libapache2-mod-php5

for php 7.*
sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0

Then, restart apache2:
sudo service apache2 restart ( Ubuntu 14.04 )
sudo systemctl restart apache2 ( Ubuntu 16.04 )

Still missing?

sudo phpenmod mcrypt
sudo phpenmod mbstring

Then, restart apache2
sudo service apache2 restart ( Ubuntu 14.04 )
sudo systemctl restart apache2 ( Ubuntu 16.04 )


If you got problem, while composer updating
“doctrine-dbal missing”

composer require Doctrine/dbal
apt-get install php-doctrine-dbal

If you got problem
” phpunit/phpunit 4.8.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.”

for general php versions
sudo apt-get install php-xml

if your php version is 5.*
sudo apt-get install php5.6-xml

if your php version is 7.*
sudo apt-get install php7.0-xml

Upgrade to PHP 7.0 on Ubuntu

Ref :

Prerequisites and disclaimer

My server is a Ubuntu 14.04 box that uses Apache 2.4 and PHP 5.5.9 prior to upgrade. These instructions are for Apache 2.4 users with a similar configuration, and I recommend you test in isolation before using in a production environment. Proceed at your own risk.

Step 1 – Add a new Apt source

At the time of writing, I’m using the packages maintained by a guy called Ondřej Surý (he’s worth a follow on Twitter) until there’s a Debian package for PHP 7 in the official release channels.

To do this, enter the following command into the box you’re upgrading:

sudo add-apt-repository ppa:ondrej/php

You’ll probably be prompted to enter your password at this point. Go ahead and enter it.

Step 2 – Install updates and the PHP 7.0 package

Next we’re going to update and upgrade packages on our system to ensure everything goes smoothly. You can do this in a single command with:

sudo apt-get update && sudo apt-get upgrade

Once this has finished, we’re ready to install PHP 7.0. Enter the following command into your terminal:

sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-mcrypt php7.0-curl

This will install PHP 7.0, along with a number of commonly used PHP packages including the Apache PHP 7 module. I found that everything else pretty much worked without being installed separately. That’s it pretty much. You shouldn’t need to make any configuration changes and everything should just work.

Step 3 – Test to ensure your server is using PHP 7.0

From the command line, type the following command:

php -v