Question

Error wit one click droplet Ubuntu LAMP 16.04 64b apache mpm_worker and php7-0

Posted September 20, 2017 1.1k views
ApacheArch Linux

I made a droplet one-click Ubuntu LAMP 16.04 64b, then for my application requirements change apache to mpm_worker mode, and throws error when restarting apache, since the php7.0 module does not work,

How do I configure php7.0 on apache mpm_worker?

I hope you can help me, thank you very much

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @arturomiranda,

You can configure php 7.0 on Ubuntu by following these steps

First of all, you can list all of the available PHP 7.0-related packages for review:

apt-cache pkgnames | grep php7.0

Then you can install the package your to-be-deployed application requires.

sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

After the installation, you can confirm that with:

php -v

The output should resemble:

PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies

The main config file of PHP 7.0 will be saved as /etc/php/7.0/apache2/php.ini (Apache)

You can use the vi text editor to modify relevant settings in that file.

sudo vi /etc/php/7.0/apache2/php.ini

Remember to restart Apache if you make any changes to that file or any other PHP config files:

sudo systemctl restart apache2.service

Regards,
KDSys

Submit an Answer