# Mautic 4.0 support for PHP 8.0

**URL:** <https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860>\
**Category:** Mautic 4 Install/Upgrade Support\
**Tags:** discussion\
**Created:** [December 2, 2021, 2:29am UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860 "2021-12-02T02:29:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ledzee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ledzee/32/4252_2.png) [@ledzee](https://forum.mautic.org/u/ledzee)\
**Post date:** [December 2, 2021, 2:29am UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/1 "2021-12-02T02:29:25Z")

</div>

**Your software**  
My version PHP 8.0  
Raspberry pi running Raspberry OS Lite.

Hello, I am looking to install Mautic 4.0 on my Raspberry pi as a side project.  
Realized that PHP 8.0 support for Mautic is in progress. - [Requirements](https://www.mautic.org/download/requirements)

Looking to see if there is any information about when PHP 8.0 support will be available.

I could roll back to the previous version but wanted to check first if there is any information.  
Thank you!!

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [January 26, 2023, 11:27am UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/2 "2023-01-26T11:27:37Z")

</div>

What is the current status of PHP 8 support? Is that still part of Mautic 5?

I tried. Mautic loads with the menu on the left side, but 500 server errors on all pages - Dashboard, Calendar, Contacts, etc.:

> Oops! An Error Occurred  
> The server returned a “500 Internal Server Error”.  
> …

Not a huge problem. I’ll just stay on PHP 7.4 for now. My websites were a mess as well. I have a lot of clean-up to do before I can upgrade I guess.

**Edit:** I see there was [another thread about this here](https://forum.mautic.org/t/is-mautic-4-ready-for-php8-yet/24202/7), with promise of PHP 8 support in Mautic 5.

And I see others have had no problems with PHP 8.0. This is the error in my logs:

> Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/username/public\_html/mautic/app/bundles/LeadBundle/Tracker/ContactTracker.php on line 358

I know how to “fix” that, but just FYI for @silavapi and team etc. I guess installing another PHP version resets the configuration to pathetic defaults?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 26, 2023, 11:53am UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/3 "2023-01-26T11:53:02Z")

</div>

8.0 support is already shipped. 8.1 had dependencies on Symfony 5 so it’s not yet released, it will require breaking changes.

---

<div class="post-metadata">

**Author:** ![astrylis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/astrylis/32/6421_2.png) [@astrylis](https://forum.mautic.org/u/astrylis)\
**Post date:** [January 26, 2023, 2:24pm UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/4 "2023-01-26T14:24:14Z")

</div>

Yeah I am running Mautic 4.4.5 on php 8.0 without issue.

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [February 4, 2023, 4:25pm UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/5 "2023-02-04T16:25:21Z")

</div>

Switched to PHP8, but still get the same 500 Internal Server Errors on all pages - Dashboard, Calendar, Contacts, etc., left-side menu loads fine. Logs has this possible cause:

```auto
Allowed memory size of 33554432 bytes exhausted (tried to allocate 65536 bytes) 

```

But even turning off memory\_limit doesn’t fix it, even after restarting apache and apache\_php\_fpm.

Or should I look for other error logs for ‘server returned a “500 Internal Server Error”’?

I tried clearing the cache via SSH, to see if that would make a difference, but got this error:

```auto
In CacheClearSubscriber.php line 46:

Failed to clear FilesystemTagAwareAdapter

cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

```

Never seen that error before, so have to assume it has something to do with the switch to PHP8.

What else could I try?

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [February 5, 2023, 4:59pm UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/6 "2023-02-05T16:59:11Z")

</div>

Upgrading to PHP8 changed my Apache user to ‘nobody’. It turned out I had to enable the Apache Module mod\_suexec in EasyApache4 to set the user back to ‘myusername’, which cleared up the 500 Internal Server Errors. Everything seems OK now. 🙂

---

<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:** [February 7, 2023, 4:59am UTC](https://forum.mautic.org/t/mautic-4-0-support-for-php-8-0/21860/7 "2023-02-07T04:59:17Z")

</div>

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