Sending example email results in 500 error

Your software
My Mautic version is: 5.0.4
My PHP version is: 8.1.27
My Database type and version is: 10.6.16-MariaDB-0ubuntu0.22.04.1

Your problem
My problem is:
Sending an example email results in 500 internal server error.

These errors are showing in the log:
None. I can’t see the error. I’ve set PHP to log to /var/log/php_error.log but to no avail.

Steps I have tried to fix the problem:
Checked out similar problem reported here. They don’t seem to apply.

I finally managed to load the configuration page and the email DSN settings were gone. No wonder Mautic could not send email. But giving a 500 error without any log details is hardly useful or helpful…

True, but Error 500 happens on the server before Mautic has a chance to kick in. Error 500 is a general web server error and always needs some investigation and research. Nothing much Mautic can do about it.

Nothing was reported in the error logs (Apache2 and PHP). Very bizarre…

1 Like

Check your other Apache logs. Error 500 are usually reported. But not necessarily where you think that they should be reported.

Anyways, Mautic is only a glorified PHP app. You may replace “Mautic” with “WordPress” and server side, will basically be the same (only require a LAMP stack).

With that said, my usual webapp checklist:
File/dir ownership (should all and only belong to the user running Apache (www-data in default Ubuntu))
File permissions (Files: 644 Directories: 755)
Resource allocation (enough RAM, storage and inodes ?)

If all fail, I’ll check my Apache configuration.

** I bet your problem is either file ownership or ram allocation. Bump your PHP ram allocation to 1024MB or 2048MB)

1 Like