我们有一个在Ubuntu 14.04.2 LTS上运行php5-fpm的NGINX服务器。
我正在尝试安装一个应用程序( OEMPRO),但它显示:
PHP IMAP扩展被禁用,请启用它。
我该如何启用PHP IMAP?
我已经检查了我们的
虽然,在
我正在尝试安装一个应用程序( OEMPRO),但它显示:
PHP IMAP扩展被禁用,请启用它。
我该如何启用PHP IMAP?
我已经检查了我们的
phpinfo
,似乎IMAP以某种方式存在,您可以在这里看到phpinfo的截图。虽然,在
mods-available/
目录中找不到IMAP。# ls /etc/php5/mods-available/
curl.ini gd.ini json.ini mcrypt.ini mysqli.ini mysql.ini opcache.ini pdo.ini pdo_mysql.ini readline.ini ssh2.ini
我需要在/etc/php5/fpm/php.ini
中启用它吗?
更新
我尝试安装IMAP,但它并没有解决问题。OEMPRO仍然显示IMAP被禁用。
# sudo apt-get install php5-imap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libassuan0 libgeoip-dev libgpgme11 libtokyocabinet9
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
php5-imap
0 upgraded, 1 newly installed, 0 to remove and 235 not upgraded.
Need to get 31.7 kB of archives.
After this operation, 158 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe php5-imap amd64 5.4.6-0ubuntu5 [31.7 kB]
Fetched 31.7 kB in 0s (0 B/s)
Selecting previously unselected package php5-imap.
(Reading database ... 60704 files and directories currently installed.)
Preparing to unpack .../php5-imap_5.4.6-0ubuntu5_amd64.deb ...
Unpacking php5-imap (5.4.6-0ubuntu5) ...
Setting up php5-imap (5.4.6-0ubuntu5) ...
# service php5-fpm restart
php5-fpm stop/waiting
php5-fpm start/running, process 2840
# sudo service nginx restart
* Restarting nginx nginx
我的phpinfo
没有变化,但现在我可以在mods-available/
中看到imap.ini
。
# ls /etc/php5/mods-available/
curl.ini gd.ini imap.ini json.ini mcrypt.ini mysqli.ini mysql.ini opcache.ini pdo.ini pdo_mysql.ini readline.ini ssh2.ini
apt-get install php5-imap
。 - Alex Blexsudo php5enmod imap
。现在它可以工作了 :) - Holly