# Failed to load resource: the server responded with a status of 500 (Internal Server Error)

**URL:** <https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [June 14, 2023, 12:36pm UTC](https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316 "2023-06-14T12:36:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [June 14, 2023, 12:36pm UTC](https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316/1 "2023-06-14T12:36:10Z")

</div>

**Your software**  
My Mautic version is: 45\_mautic-449  
My PHP version is: PHP 8.0  
My Database type and version is: MySQL 8.0  
The host is: cPanel/WHM

Hi Everyone,

**Failed to load resource: the server responded with a status of 500 (Internal Server Error) at [https://mautic.cfored.com](https://mautic.cfored.com)**

 ![2023-06-14 05.05.18 mautic.cfored.com 5d93c9b499a7](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/7684e46fc7681cd5e8ce1ae278abd221b7f63efc.png)

 ![2023-06-14 00.17.44 imap.cfored.com 102aac3f83d5](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/860d9a47523f502152140a2373322ce1f96286a6.png)

I. Description of the Issue:

When accessing [mautic.cfored.com](http://mautic.cfored.com) we receive a 502 bad gateway error.

II. Log Results:

1. NGINX error log:

2023/06/13 16:56:58 [error] 16346#16346: \*5279 connect() failed (110: Connection timed out) while connecting to upstream, client: 184.94.197.2, server: [mautic.cfored.com](http://mautic.cfored.com), request: “GET /favicon.ico HTTP/1.1”, upstream: “[http://10.168.0.5:81/favicon.ico](http://10.168.0.5:81/favicon.ico)”, host: “[mautic.cfored.com](http://mautic.cfored.com)”, referrer: “[http://mautic.cfored.com/](http://mautic.cfored.com/)”

1. And many other errors are logged to the Apache error log. Here are a few for example:

[Tue Jun 13 17:00:41.846015 2023] [cgi:error] [pid 9039] [client 127.0.0.1:52676] AH01215: PHP Warning: foreach() argument must be of type array|object, bool given in /var/www/html/app/middlewares/MiddlewareBuilder.php on line 75: /usr/local/cpanel/cgi-sys/ea-php81, referer: [http://34.145.37.45/installer](http://34.145.37.45/installer)  
[Tue Jun 13 17:00:41.855688 2023] [cgi:error] [pid 9039] [client 127.0.0.1:52676] AH01215: PHP Deprecation - rtrim(): Passing null to parameter #1 ($string) of type string is deprecated - in file /var/www/html/app/bundles/CoreBundle/Loader/EnvVars/ElFinderEnvVars.php - at line 11: /usr/local/cpanel/cgi-sys/ea-php81, referer: [http://34.145.37.45/installer](http://34.145.37.45/installer)  
[Tue Jun 13 17:00:41.855958 2023] [cgi:error] [pid 9039] [client 127.0.0.1:52676] AH01215: PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/app/bundles/CoreBundle/Loader/EnvVars/ElFinderEnvVars.php on line 11: /usr/local/cpanel/cgi-sys/ea-php81, referer: [http://34.145.37.45/installer](http://34.145.37.45/installer)  
[Tue Jun 13 17:00:41.869506 2023] [cgi:error] [pid 9039] [client 127.0.0.1:52676] AH01215: PHP Warning - Undefined variable $inline - in file /var/www/html/offline.php - at line 77: /usr/local/cpanel/cgi-sys/ea-php81, referer: [http://34.145.37.45/installer](http://34.145.37.45/installer)  
[Tue Jun 13 17:00:41.869657 2023] [cgi:error] [pid 9039] [client 127.0.0.1:52676] AH01215: PHP Warning: Undefined variable $inline in /var/www/html/offline.php on line 77: /usr/local/cpanel/cgi-sys/ea-php81, referer: [http://34.145.37.45/installer](http://34.145.37.45/installer)  
[Tue Jun 13 17:00:41.869883 2023] [cgi:error] [pid 9039] [client 127.0.0.1:52676] AH01215: RuntimeException: Unable to create the “cache” directory (/var/www/html/var/cache/prod). - in file /var/www/html/vendor/symfony/http-kernel/Kernel.php - at line 686: /usr/local/cpanel/cgi-sys/ea-php81, referer: [http://34.145.37.45/installer](http://34.145.37.45/installer)

III. Request for Help

Verify server requirements: Ensure that my server meets the minimum requirements for running Mautic. Check the PHP version, required extensions, and server configurations specified by Mautic’s documentation. See the captured screenshot image and recommend cPanel packages to remove.

 ![2023-06-14 04.49.15 imap.cfored.com 5c24d5aba491](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1b2aeade8d745591084e4f86a318e56d357e0532.png)

IV. Expected Result

Login to [http://mautic.cfored.com](http://mautic.cfored.com) without the offline error message.

Steps I have tried to fix the problem:  
Uninstall Packages.

Thanks,  
Team

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 14, 2023, 1:33pm UTC](https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316/2 "2023-06-14T13:33:32Z")

</div>

New install or update?  
Please run a php console mautic:asset:generate and php console cache:clear afterwards on the command line.

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [June 14, 2023, 2:06pm UTC](https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316/3 "2023-06-14T14:06:22Z")

</div>

dirk\_s,

New install.

See the results of the CLI command lines:

[admin6@imap ~]$ cd /var/www/html/mautic  
jailshell: cd: /var/www/html/mautic: No such file or directory  
[admin6@imap ~]$ php bin/console mautic:assets:generate  
Could not open input file: bin/console  
[admin6@imap ~]$ ls  
access-logs etc logs perl5 repositories var  
cache imap\_cfored\_com.csr mail public\_ftp ssl www  
CforED imap\_cfored\_com.pem nodejsapp public\_html tmp  
[admin6@imap ~]$

Regards,  
Team

---

<div class="post-metadata">

**Author:** ![team](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@team](https://forum.mautic.org/u/team)\
**Post date:** [June 15, 2023, 2:24pm UTC](https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316/4 "2023-06-15T14:24:08Z")

</div>

“While reproducing the error, I found the following entries in the Apache error log. The main problem is that directories cannot be created, which causes the rest of the error entries. This is caused by using the CGI PHP handler for PHP 8.0. To correct this, I have installed and enabled the suPHP handler. The following article provides instructions for changing the handler using the MultiPHP Manager tool in WHM. To correct this issue, you can use the EasyApache 4 tool to install the fileinfo extension for PHP 8.0. I have provided the following article with instructions for installing PHP extensions,” Lupe Gomez, Technical Analyst I | cPanel Migrations, cPanel, LLC.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [June 17, 2023, 2:24am UTC](https://forum.mautic.org/t/failed-to-load-resource-the-server-responded-with-a-status-of-500-internal-server-error/28316/5 "2023-06-17T02:24:22Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
