How to use in 5.0 the php 8.1 version?

Hello, to prepare myself for 5.0 i’d like to ask something about using it with php 8.1 on Ubuntu 22.04 server.

At the moment i have only installed php 8.0.30 on my server an there is running Mautic 4.4.10 and Moodle 4.0.3.
I want to use Mautic 5.0 with php 8.1 (and moodle still with 8.0.30)

  1. How is the correct php install command for 8.1 include all required modules?
  2. How can i use Mautic with php8.1 (instead of the 8.0)
  • Do i have adjust the Cronjobs (and how)?
  • Where do i have adjust the setting?
  • Special things to do?

Stefan,
You can run multiple copies of PHP on a server. I would make sure have each technology running on it’s own subdomain, which you can then set the version of PHP for the subdomain. Or it can be domain and subdomain. In your cronjob, specify which PHP version you’re using to to execute the command.

Fine.
These things i’m interessted:

  1. What is the command on my ubuntu server to install php 8.1 and all required submoduls of php 8.1?

  2. How/where do i set my subdomain (e.g. mautic.mydomain.de) to use the php 8.1

  3. My cron job has this synthax. How do i set this to use php 8.1?

* * * * * php /var/www/html/mautic/bin/console mautic:campaigns:trigger

Thanks in advance for detailed answer.

I asked here i got a working tutorial for 2 different php versions.

But i wanted to check the used php version with a info.php file in the root directory of Mautic, but i get an error: https://ma.stefan-franz.de/info.php
File content: <?php phpinfo(); ?>

What is the reason for this or what do i have to adjust to get access?

This is a very basic apache permission problem and probably[1] not mautic related. Please google it or use your AI/LLM/GPT of choice to answer and solve this.

In a nutshell: You need to enable access via .htaccess or your vhost or check if you blocked access in some other place.


  1. at best mautic related, as mautics htaccess might have blocked access. ↩︎

look at your server(i.e. in Ubuntu is /usr/bin/php8.1) and give path to php command in cronjob.
like:

* * * * * /usr/bin/php8.1   /var/www/html/mautic/bin/console mautic:campaigns:trigger

Hello good morning

Not to disturb other forums, I have a similar problem. I have my server with MAUTIC in version 4.4.10 and it suggests upgrading to 5.0.3. I pass a screenshot of my MAUTIC versions.

On the other hand, on my server PLESK tells me that PHP is obsolete in version 8.0.30 and suggests that I move to 8.2.16 on the hosting where I have created the domain for MAUTIC, which is running version 8.0.30 of PHP.

Is it feasible to proceed with it or is it dangerous. Is there someone who has gone through this ordeal. Any recommendation?

Thank you,
Luis