Your software
My Mautic version is: 4.0.1
My PHP version is: 7.4
My Database type and version is: mariadb
Your problem
My problem is: trying to make a call -
http://send.pinkcreators.com/api/contacts/new?firstname=tester&lastname=testt&email=testinggg@gmail.com
api is returning the 500 error.
HTTP/1.1 500 Internal Server Error
Date: Fri, 22 Oct 2021 20:14:56 GMT
Server: Apache/2.4.41 (Ubuntu)
Vary: Authorization
Set-Cookie: a86c511dba8f33b15af45aa3ffe=dcgc8vv7lgmdlpt887h578; path=/; HttpOnly
Content-Length: 831
Connection: close
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex,nofollow,noarchive" />
<title>An Error Occurred: Internal Server Error</title>
<style>body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
.container { margin: 30px; max-width: 600px; }
h1 { color: #dc3545; font-size: 24px; }
h2 { font-size: 18px; }</style>
</head>
<body>
<div class="container">
<h1>Oops! An Error Occurred</h1>
<h2>The server returned a "500 Internal Server Error".</h2>
<p>
Something is broken. Please let us know what you were doing when this error occurred.
We will fix it as soon as possible. Sorry for any inconvenience caused.
</p>
</div>
</body>
</html>
These errors are showing in the log:
Steps I have tried to fix the problem:
at first I was getting the 404 error, and API was actually WORKING, but then I followed the suggested troubleshooting steps -
rm -rf /var/www/html/app/cache/*
php7.4 /var/www/html/bin/console cache:clear
restarted the server, and now it’s the 500 error.
apache logs -
POST /api/contacts/new?firstname=tester&lastname=testsss&email=tester@gmail.com HTTP/1.1" 500 1130 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"
on the dashboard the error log is empty. Please help, thank you!!