全球主机交流论坛

标题: 求助mjj,php安装imap的问题 [打印本页]

作者: 江南好风景    时间: 2016-10-10 09:22
标题: 求助mjj,php安装imap的问题
不RT

用的是lnmp.org的lnmp1.3版本,装完发现php没有imap,遂百度之,重新编译php-5.4.45,加入'--with-imap' '--with-imap-ssl'选项

编译安装完之后,在/usr/local/php/etc/php.ini  一坨;extension=xxx 那里加入extension=imap.so,但是重启php-fpm报错:

  1. root@MJJ:~# service php-fpm restart
  2. Gracefully shutting down php-fpm . done
  3. Starting php-fpm [10-Oct-2016 09:22:48] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'imap.so' in Unknown on line 0
  4. done
复制代码


求助有经验的MJJ,这个肿么办?我phpinfo.php也看不到imap,应该是没装成功吧?
作者: 江南好风景    时间: 2016-10-10 10:04

作者: 日后再说    时间: 2016-10-10 10:05
extension=/xxxx/xxxx/imap.so
把详细路径带上
作者: 江南好风景    时间: 2016-10-10 10:33

自己解决了

我昨晚重新编译了php,带上'--with-imap' '--with-imap-ssl'选项,刚才发现vpser的教程里,php是默认装好的,所以我就重新编译了一次,不带上'--with-imap' '--with-imap-ssl' '--with-kerberos'这几个,也就是lnmp脚本默认安装的:

  1. './configure'  '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir' '--with-freetype-dir=/usr/local/freetype' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--with-mcrypt' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap' '--with-gettext' '--disable-fileinfo' '--enable-intl' '--with-xsl'
复制代码


然后对着教程撸就是了:
http://www.vpser.net/manage/lnmp-php-install-ext.html




欢迎光临 全球主机交流论坛 (https://loc.888543.xyz/) Powered by Discuz! X3.4