Question

Apache won't start with multiple php modules enabled

Posted September 22, 2021 71 views
ApachePHPUbuntu 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.
2 comments
  • Can you provide the apache error logs? try this command: tail -50 /var/log/apache2/error.log

    Also, please provide more info, like the following:

    • Server type (size)
    • modules you are trying to use
    • PHP version

    If the error logs turn up nothing of value, try this:

    journalctl -u apache2.service

    Post any details you can provide, and I’ll try to help as I can (I don’t work for DO. I just REALLY like helping people).

  • 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.

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.

×
Submit an Answer
1 answer

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