Fatal Error: Call to undefined function imap_open PHP

Omair Shahid

I have followed the steps below to enable IMAP and still things are not working.


    sudo apt-get install php5-imap
    sudo apt-get install php5-cli
    sudo php5enmod imap 
    service php5-fpm restart
    sudo service nginx restart


I can see the IMAP extension enabled under phpinfo and also can see the extension is loaded using command dpkg -l | grep php5-imap

Server: Linux and using nginx

mforsetti

This should be a comment, but I haven't got the reps for comment, so...

  1. Try to check your extension file, i.e. make sure that in /etc/php5/mods-enabled/imap.ini, the keyword extension=/path/to/imap.so is not commented (having ; or # as its beginning of line) and your /path/to/imap.so file exists.

  2. Try to check if you had multiple php-fpm services running. Use systemctl list-unit-files | grep php to check. If you had multiple php-fpm services, make sure you had installed imap extension to the correct php-fpm instance.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

CodeIgniter PHP Fatal error: Call to undefined function form_open()

PHP Fatal error: Call to undefined function imagecreatefrompng()

PHP Fatal error: Call to undefined function?

Fatal error: Call to undefined function

PHP Fatal error: Call to undefined function curl_init()

PHP Fatal error : Call to undefined function mysql_connect()

PHP to Postgres - Fatal error: Call to undefined function pg_connect()

PHP Fatal error: Call to undefined function json_decode()

PHP Fatal error: Call to undefined function pdo_query()

PHP Fatal error: Call to undefined function Laravel tinker

PHP Fatal error: Call to undefined function json_decode() on Cpanel

Fatal error: Call to undefined function gregoriantojd() in docker PHP

Wordpress - PHP Fatal error: Call to undefined function get_bloginfo()

Fatal error: Call to undefined function gmp_sign() in php

Fatal error: Call to undefined function normalizamyway() php abstract class

PHP Error: Fatal error: Call to undefined method

phpMyAdmin Fatal error: Call to undefined function __()

Call to undefined function iconv() fatal error - Suitecrm

Deployer - Fatal error: Call to undefined function server()

Fatal error: Call to undefined function bindParam()

Fatal error: Call to undefined function runQuery()

Fatal Error: Call to undefined function curl()

PHP Classes - Fatal error: Call to undefined method

PHP: Fatal error: Call to undefined method mysqli

Fatal error: Uncaught Error: Call to undefined function redirect() PHP logout session

Fatal error: Uncaught Error: Call to undefined function ereg_replace() PHP 7

In PHP 7.0 Fatal error: Uncaught Error: Call to undefined function json_encode()

PHP Fatal error: Uncaught Error: Call to undefined function mssqli_fetch_assoc()

Attempted to call function "imap_open" from namespace