嗨,我正在我的linux centos7服务器上安装php7.4.21的邮件解析,但是文档不是很好,我也不是sysadin。
https://www.php.net/manual/en/mailparse.installation.php声明“为了使用这些函数,您必须使用--启用-邮件解析配置选项来编译具有邮件解析支持的PHP”。这不是很有帮助,但到目前为止,我不得不做以下工作:
// To install re2c:
> curl http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/r/re2c-0.14.3-2.el7.x86_64.rpm --output re2c-0.14.3-2.el7.x86_64.rpm
> rpm -Uvh re2c-0.14.3-2.el7.x86_64.rpm
// I then installed mailparse
> pecl install mailparse
// I then modified php.ini to add the following:
extension=mailparse
// I then restarted apache
> systemctl restart httpd但是,看看我的phpinfo输出,我就看不到邮件解析列出了。接下来我需要做什么?
注意:我不确定我是否真的“用邮件解析编译了PHP”,我也不知道如何应用“使用--启用-邮件解析配置选项”。
谢谢安倍
发布于 2022-01-04 16:23:39
因此,我最后在https://github.com/php-mime-mail-parser/php-mime-mail-parser/blob/master/README.md上讨论了在Ubuntu系统中使用sudo apt install php-cli php-mailparse的问题,经过更多的努力,我发现yum install php-cli php-mailparse相当于centos (然后重新启动apache)。这个成功了。
yum install php-cli php-mailparse
systemctl restart httpdhttps://stackoverflow.com/questions/70462044
复制相似问题