Mautic 500 "Uh oh! I think I broke it." on form submit: fix
The Mautic message `500 Internal Server Error ("Uh oh! I think I broke it.")` is a generic page hiding a PHP or database exception. Read the Mautic log and your web server's error log to find the real cause; then clear the cache, fix permissions, run migrations, or repair the failing form action.
Sohail Hussain9 min readShort answer
- The 500 page says only that Mautic threw an exception; the cause is in the log entry written when you submitted the form, so read that first.
- The usual culprits are stale cache or permissions, a database schema that lags the code, a form action (often email) that fails, or a firewall rule blocking the POST.
- Clear the cache as the web user, run pending migrations, then disable the form's email action to see whether it is the trigger.
You submit a Mautic web form and the browser lands on this instead of a thank-you message:
500 Internal Server Error ("Uh oh! I think I broke it.")
People on the Mautic community forum report this exact symptom after creating a form and trying to send it. The threads I checked describe the problem but do not show one confirmed resolution, so this page is a diagnostic path, not a single magic setting. I can't promise one cause fits every install.
Why it happens
"Uh oh! I think I broke it." is Mautic's production-mode error page. It appears for any unhandled server-side error, so the text is identical whether the cause is a database problem, a PHP fatal error, a bad plugin or a mail failure. The 500 status tells you the server failed, not why.
Causes, roughly from most to least common:
- Stale cache or a cache and log directory the web user can't write to, usually after an upgrade, a restore or a change of server user.
- A database schema that does not match the code, typically right after an upgrade, or a missing results table for one specific form.
- A form action that throws, such as an email action when the mail transport rejects the connection or credentials.
- PHP limits, a missing extension or an unsupported PHP version.
- A WAF, ModSecurity rule or proxy that returns the 500 before Mautic ever sees the request.
One quick split helps. If the 500 happens only on form submit and the rest of the admin works, suspect something form-specific: the results table, an action, or a rule in front of Mautic. If the whole site returns 500, suspect cache, permissions, PHP version or a failed upgrade.
Find the real error first
Change nothing yet. Submit the form once, note the exact time, then check these in order.
- Open Mautic's own log. On a standard install, look in
var/logs/under your Mautic root for the latestmautic_prodfile, and search forCRITICALorERRORnear your timestamp. - Open the web server error log and the PHP-FPM log (Apache or Nginx). Fatal errors such as memory exhaustion or a missing PHP extension often land there and not in Mautic's log.
- If neither log has an entry at your timestamp, the request probably never reached Mautic. Something in front of it is returning the 500.
Hosts and Docker images sometimes move these paths. If you can't find them, ask your host where PHP errors are written.
Test from the preview page
Submit the same form from Mautic's own preview page and from your embedded copy. If only the embedded copy fails, you are looking at a firewall, cross-origin or embedding problem, not a Mautic bug.
Step-by-step fixes
Fix 1: clear the cache and repair permissions
The log usually shows a failure to write a file or create a directory under var/cache or var/logs.
- Find which user runs PHP (often
www-data). Run the commands below as that user, not root, so new cache files aren't owned by root. - From your Mautic root, clear the cache:
sudo -u www-data php bin/console cache:clear
- Make sure that user owns the cache and log directories:
sudo chown -R www-data:www-data var/cache var/logs
- Adjust the user and group to match your server, then submit the form again.
Fix 2: run pending database migrations
If the log shows a Doctrine or SQL error such as a missing table or unknown column, the database doesn't match the code.
- Back up the database first.
- From the Mautic root, run the migrations as the web user:
sudo -u www-data php bin/console doctrine:migrations:migrate --no-interaction
- Clear the cache again (Fix 1, step 2).
There is a form-specific variant. Mautic stores each form's submissions in its own results table. If the log names a table starting with form_results_ that doesn't exist, the form may have been imported, cloned or restored without it. Re-saving the form in the builder is the first thing to try. If the table is still missing, restoring from a backup is safer than creating it by hand.
Back up before migrating
Migrations change your database structure and can't be undone with a click. Take a database backup before you run them, especially on a production install.
Fix 3: isolate a failing form action
Forms can run actions after submission, such as sending an email. If an action throws, for example because the mail transport refuses the connection or credentials, the exception can surface as a 500 even though the submission itself was valid.
- Open the form in Mautic and note the actions listed in the form builder.
- Temporarily disable the action that sends email, save the form and submit again.
- If the 500 disappears, the mail setup is the problem. In Mautic's Configuration, review the email settings, then confirm your SMTP host, port, encryption and credentials with your mail provider.
Our explanation of SSL/TLS for SMTP covers the port and encryption pairs behind most connection failures. Re-enable the action once mail works, and test again.
Fix 4: check PHP limits, extensions and version
Look in the log for "Allowed memory size exhausted", "Call to undefined function" or a missing-extension message. Supported PHP versions depend on the Mautic release, so compare your server's version with the requirements in the documentation for your exact Mautic version. Raise memory_limit only if the log actually shows memory exhaustion; raising it blindly hides nothing and fixes nothing.
Fix 5: rule out a firewall or security rule
If Mautic's log is silent, test the submission from a different network, or temporarily disable ModSecurity or your CDN's WAF rules for the form path. Forms embedded on other sites send a cross-origin POST, and some rule sets treat those as attacks. If the 500 vanishes, ask your host which rule fired and write a narrow exception for it rather than leaving the firewall off.
Match the log to the cause
| What the log shows | Likely cause | Fix |
|---|---|---|
| Permission denied, cache directory | Stale cache or ownership | Fix 1 |
| Table or column not found | Schema out of date | Fix 2 |
form_results_ table missing | Form restored without its table | Fix 2, re-save form |
| SMTP, transport or mailer exception | Failing email action | Fix 3 |
| Memory, undefined function, extension | PHP limits or version | Fix 4 |
| Nothing in Mautic's log | Firewall or proxy | Fix 5 |
Checklist before you try again
- You read the log entry from the exact time of the failed submit.
- Cache was cleared as the web user, not root.
var/cacheandvar/logsare writable by the PHP user.- Migrations ran with no errors, after a backup.
- The form works with its email action disabled, or the mail settings are confirmed.
- The preview page and the embedded form behave the same.
If nothing works
Ask the Mautic community forum or your host, and include:
- Your Mautic and PHP versions, and how it is hosted (shared host, VPS, Docker).
- The exact log lines around the submit time, with passwords and tokens removed.
- Whether it happens for every form or just one, and whether it also fails from the preview page.
- What you already tried from this page.
Subject: 500 error on Mautic form submit ("Uh oh! I think I broke it.")
Mautic version: {version}
PHP version: {version}
Hosting: {shared host / VPS / Docker}
Submitting a web form returns:
500 Internal Server Error ("Uh oh! I think I broke it.")
Time of the failed submit (with timezone): {timestamp}
Log lines at that time (secrets removed):
{paste lines}
Happens on: {all forms / one form}; preview page: {fails / works}
Already tried: cache:clear as the web user, permissions on var/cache and var/logs,
migrations, disabling the form's email action.
Common questions
Why does the page say "I think I broke it" instead of the real error?
It is the generic production error page, designed not to expose internals to visitors. The details go to the log, which is why reading the log comes first.
Does the 500 mean my submission was lost?
Not necessarily. If the failure happens in a form action after the data is saved, the submission may exist in the form's results. Check the form's results in Mautic before asking people to resubmit.
Should I turn on debug mode to see the error?
Only on a staging copy or briefly, because debug output can expose paths and configuration to visitors. The production log normally holds the same exception without that risk.
Can I prevent this after upgrades?
Back up the database and files first, run migrations and clear the cache as the web user right after, and submit a test form on a staging copy before touching production.
Explore: Email Marketing Strategy
Related Articles
414 Request-URI Too Large in n8n's Amazon SES node: fix
The error 414 Request-URI Too Large in n8n's AWS SES node means a server in the path refused a request whose URL was too long, which a long HTML body can cause when it travels in the URL. Send through the SES v2 API with an HTTP Request node, or use SES SMTP.
Access denied, bad outbound sender: Outlook cold email fix
"Access denied, bad outbound sender" (550 5.1.8) means Microsoft 365 has put your mailbox on its restricted users list for spam-like sending. An admin must unblock it under Restricted entities in the Microsoft Defender portal. Then clean your list, lower your volume and resume gradually.
Acoustic Campaign "Application error" on login: bookmark fix
Acoustic Campaign shows "application error" at login when you open it from a bookmark saved while you were logged in, because the bookmark carries the old session. Log out, type your pod URL (campaign-us-[X].goacoustic.com) into the address bar, log in, then save a fresh bookmark.
ActiveCampaign 502 Bad Gateway and Tags Failed to Load: Fixes
"Bad gateway Error code 502" in ActiveCampaign means Cloudflare, the proxy in front of the app, got no valid response from ActiveCampaign's servers. That is usually their side. Check the status page, retry in a clean browser session, clear cookies, then send support the Ray ID if it persists.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free