imap与php7.0无法正常工作

时间:2016-11-20 22:57:52

标签: apache imap symfony php-7

我已经在Ubuntu 16.04上安装了Apache 2.4和PHP 7.0的imap扩展名:

sudo apt-get install php7.0-imap

然后重启apache。但我仍然无法调用像imap_search()这样的函数,我得到错误

Attempted to call function "imap_search" from namespace "PhpImap"

phpinfo()关于imap:

  

协议dict,file,ftp,ftps,gopher,http,https,imap,imaps,   ldap,ldaps,pop3,pop3s,rtmp,rtsp,smb,smbs,smtp,smtps,telnet,   tftp

     

IMAP Rex Logan,Mark Musone,Brian Wang,Kaj-Michael Lang,Antoni   Pamies Olive,Rasmus Lerdorf,Andrew Skalski,Chuck Hagenbuch,Daniel   R Kalowsky

1 个答案:

答案 0 :(得分:0)

你试过了吗?

a2enmod imap

我不确定这是否是Ubuntu的确切命令。 这是文档: http://manpages.ubuntu.com/manpages/xenial/man8/a2enmod.8.html

我怀疑你必须启用它。