0
votes

I wanted to change my PHP version in Ubuntu from 7.1 to 5.6, I uninstalled PHP7 but now I can't run Apache2. I have PHP5.6 installed already. I get this error when I try restart apache service :

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

● apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; generated; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Mon 2017-01-30 10:23:28 CET; 2min 35s ago Docs: man:systemd-sysv-generator(8) Process: 15026 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 15052 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

* * The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 216 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf-enabled/phpmyadmin.conf: No such file or Action 'configtest' failed. The Apache error log may have more information. apache2.service: Control process exited, code=exited status=1 Failed to start LSB: Apache2 web server. apache2.service: Unit entered failed state. apache2.service: Failed with result 'exit-code'.

1
apache will point one php module so after removal please make a setup call for php5 and restart you apache. call sudo apt-get install php5 or your php version. for second error make sure you have installed phpmyadmin in proper way.webDev
phpmyadmin always try to install php7 modules, how to force him to install modules of php5.6 ??user2997418
remove php and install fresh php5 and then fresh phpmyadmin. first remove all php related package. this is easiest way. and if you cant do that then just try to apt-get remove php7*webDev
thank you, this solved my problem, and I didnt install Phpmyadmin, I work better with Workbench. you can make your answer so I accept it. Than youuser2997418

1 Answers

2
votes

Remove PHP and install fresh php5 and then fresh phpmyadmin. First of all you need to remove all PHP related package because to make sure there will not be conflicting packages and this is also easiest way I think. TO remove use

sudo apt-get remove php7*

And now install PHP5.* ( 5.6 )