我是否应该调整其他地方的设置,以便Mautic可以使用PHP7.4?
在浏览器中导航到Mautic安装时收到的消息:"Mautic此时不支持PHP8.1.2,要使用Mautic,您需要降级到早期版本。“
发布于 2022-09-04 14:28:05
您需要降低当前php版本的级别。看起来您运行的是8.1.2,通常是随ubuntu22.04一起提供的。
为了让Mautic4.x工作,您需要将其降级到8.0。如果你是在一个较小的版本,你将需要降级到7.4。
若要将评级降至8.0,请运行以下命令:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install php-imagick php8.0-fpm php8.0-mysql php8.0-common php8.0-gd php8.0-imap php8.0-imap php8.0-curl php8.0-zip php8.0-xml php8.0-mbstring php8.0-bz2 php8.0-intl php8.0-gmp
systemctl start php8.0-fpm然后继续创建以下文件sudo nano /etc/php/8.0/fpm/conf.d.d/60-custom.ini
并将以下内容放入其中:
# Default is 128M. Set it to 512M for better performance.
memory_limit = 512M
# Set default timezone in PHP. You can find your own time zone format at https://www.php.net/manual/en/timezones.php
date.timezone = America/New_York
# Set the max file upload size in PHP
upload_max_filesize = 256M
post_max_size = 256M
# Change session lifetime to avoid the CSRF token error.
session.gc_maxlifetime = 14400
; The OPcache shared memory storage size.
opcache.memory_consumption=256
; The amount of memory for interned strings in Mbytes.
opcache.interned_strings_buffer=32sudo systemctl重新加载php8.0-fpm
运行此命令并为您的版本选择8.0 : sudo update-version config php
如果使用nginx,请确保在mautic.conf文件中调用php8.0-fpm。
如果您正在运行apache,则需要使用a2enmod (我不太熟悉,因此建议谷歌搜索如何禁用8.1和启用8.0)。
https://stackoverflow.com/questions/72989603
复制相似问题