Report this

What is the reason for this report?

Apache won't start with multiple php modules enabled

Posted on September 22, 2021

Connected Tutorial(This question is a follow-up to this tutorial):

How To Run Multiple PHP Versions on One Server Using Apache and PHP-FPM on Ubuntu 20.04

I followed the directions in the tutorial. The only difference was a I chose different php versions. Apache won’t start with multiple php modules enabled. If I have only one php version enabled, apache starts up with no error.

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Sep 22 02:42:04 app01 kernel: apache2[60467]: segfault at 8 ip 00007f729d7d2e75 sp 00007ffc4029b>
Sep 22 02:42:04 app01 kernel: Code: 41 5d e9 0e fa ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f >
Sep 22 02:42:05 app01 apachectl[60454]: Segmentation fault (core dumped)
Sep 22 02:42:05 app01 apachectl[60454]: Action 'start' failed.
Sep 22 02:42:05 app01 apachectl[60454]: The Apache error log may have more information.
Sep 22 02:42:05 app01 systemd[1]: apache2.service: Control process exited, code=exited, status=1>
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit apache2.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 139.
Sep 22 02:42:05 app01 systemd[1]: apache2.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Sep 22 02:42:05 app01 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: A start job for unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has finished with a failure.
--
-- The job identifier is 6831 and the job result is failed.


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

This question was answered by @gcornelisse:

Sorry, wish I could delete this question. If you’re running php-fpm you don’t need to enable more than one PHP version because Apache will forward the request to the right PHP version based on your VirtualHost configuration.

View the original comment

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.