# \[Install\] Invalid PEM encoded certificate

**URL:** <https://forum.mautic.org/t/install-invalid-pem-encoded-certificate/30914>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [February 16, 2024, 9:34am UTC](https://forum.mautic.org/t/install-invalid-pem-encoded-certificate/30914 "2024-02-16T09:34:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![laclac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/laclac/32/13366_2.png) [@laclac](https://forum.mautic.org/u/laclac)\
**Post date:** [February 16, 2024, 9:34am UTC](https://forum.mautic.org/t/install-invalid-pem-encoded-certificate/30914/1 "2024-02-16T09:34:08Z")

</div>

**Your software**  
My Mautic version is: 5.0.3  
My PHP version is: 8.0.1  
My Database type and version is: Mysql

**Your problem**  
My problem is:

Good morning,

I installed Mautic locally on my machine (WAMP/Windows).  
I had the installation web interface and I filled in all the information.  
But when I open mautic [http://localhost/](http://localhost/), I get the error page:  
“Uh oh! I think I broke it. If I do it again, please report me to the system administrator!  
500 Internal Server Error”

These errors are showing in the log:  
[2024-02-16T09:09:03.257081+00:00] mautic.WARNING: PHP Warning - file\_get\_contents(D:\newsletter/var/cache/saml\_default.key): Failed to open stream: No such file or directory - in file D:\newsletter\app\bundles\UserBundle\Security\SAML\Store\CredentialsStore.php - at line 84 {“hostname”:“PC-2”,“pid”:16968}  
[2024-02-16T09:09:03.295986+00:00] mautic.CRITICAL: Uncaught PHP Exception InvalidArgumentException: “Invalid PEM encoded certificate” at D:\newsletter\vendor\litesaml\lightsaml\src\Credential\X509Certificate.php line 73 {“exception”:“[object] (InvalidArgumentException(code: 0): Invalid PEM encoded certificate at D:\newsletter\vendor\litesaml\lightsaml\src\Credential\X509Certificate.php:73)”} {“hostname”:“PC-2”,“pid”:16968}

Steps I have tried to fix the problem:  
reinstaall but without success

---

<div class="post-metadata">

**Author:** ![sgtbhaji](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sgtbhaji/32/637_2.png) [@sgtbhaji](https://forum.mautic.org/u/sgtbhaji)\
**Post date:** [March 29, 2024, 9:38pm UTC](https://forum.mautic.org/t/install-invalid-pem-encoded-certificate/30914/2 "2024-03-29T21:38:36Z")

</div>

Did you ever find the solution to this? Hitting the same issue. Thanks!

---

<div class="post-metadata">

**Author:** ![cornelc](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@cornelc](https://forum.mautic.org/u/cornelc)\
**Post date:** [June 10, 2024, 8:43pm UTC](https://forum.mautic.org/t/install-invalid-pem-encoded-certificate/30914/3 "2024-06-10T20:43:54Z")

</div>

Anybody found a solution here ?

PHP Warning: file\_get\_contents(C:\inetpub\wwwroot\mautic/var/cache/saml\_default.crt): Failed to open stream: No such file or directory in C:\inetpub\wwwroot\mautic\app\bundles\UserBundle\Security\SAML\Store\CredentialsStore.php on line 83

---

<div class="post-metadata">

**Author:** ![DogByteMarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dogbytemarketing/32/11625_2.png) [@DogByteMarketing](https://forum.mautic.org/u/DogByteMarketing)\
**Post date:** [November 16, 2025, 8:42am UTC](https://forum.mautic.org/t/install-invalid-pem-encoded-certificate/30914/4 "2025-11-16T08:42:21Z")

</div>

For anyone else coming across this issue in the future, you can manually generate the key and cert within the var/cache folder.

openssl genpkey -algorithm RSA -out saml\_default.key -pkeyopt rsa\_keygen\_bits:2048  
openssl req -new -x509 -key saml\_default.key -out saml\_default.crt -days 365 -subj “/CN=mautic-saml”
