Ad

How to fix 500 Internal Server Error in Mautic?

Posted

If you are getting 500 Internal Server Error in Mautic, then don't consider this to be a bug with Mautic. This error is mostly because of some misconfiguration on your server or Mautic instance. 

In this tutorial, you will learn a few of the most common reasons for getting, 500 Internal Server Error in Mautic.

Common reasons for 500 Internal Server Error:

MySQL issue

It may be a temporary issue because of the memory consumption during the upgrade or optimizations of segment queries. If you check the logs, then you might find an error something like this;

mautic.ERROR: Segment QB: Query Exception: An exception occurred while executing 'SELECT count(leadIdPrimary) count, max(leadIdPrimary) maxId, min(leadIdPrimary). 

Refer this Stackoverflow post for more details: https://stackoverflow.com/questions/4380813/how-to-get-rid-of-mysql-error-prepared-statement-needs-to-be-re-prepared/4381155#4381155

Curl is missing

In case, you are getting some error like the one below, then most probably this is because CURL module is not installed or not enabled in your PHP.

[2016-08-15 19:11:52] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedFunctionException: "Attempted to call function "curl_init" from namespace

Wrong Parameter settings

In case you are getting some error like the one below:

[ssl:warn] [pid 3609:tid 139967997105984] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name 

This means there is some misconfiguration in your Mautic setup.

Conclusion

Hope the above solutions helped you debugged the issue. In case you have discovered something, which is not covered as a part of this tutorial, then please feel free to contribute those below in comments.