我们有一个 NGINX 服务器在 Ubuntu 14.04.2 LTS 上运行,带有 php5-fpm。
我正在尝试安装的应用程序(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
保持不变,但我现在可以imap.ini
在mods-available/
.
# 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