Edit report at https://bugs.php.net/bug.php?id=60578&edit=1
ID: 60578
User updated by: profymath at yahoo dot com
Reported by: profymath at yahoo dot com
Summary: IMAP-functions don't work!
Status: Open
Type: Bug
Package: IMAP related
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
One more option!
Previous Comments:
------------------------------------------------------------------------
[2011-12-20 22:18:42] profymath at yahoo dot com
Description:
------------
Note:
1. imap.so is loaded (as seen from the script and, through
get_loaded_extensions() function);
2. imap.ini is parsed (as seen from phpinfo() function);
3. php is compiled with imap (as seen from phpinfo() function, IMAP c-Client
Version 2007e);
4. error log file (php.ini) don't record any failures after launching the
script;
5. connection to IMAP Server (dovecot) through telnet doesn't have any problem.
Moreover, when I start the script I see that the connection to IMAP Server goes
well but it is disconnected immediately. That is compared to telnet connection,
the connection through imap_open function doesn't stay opened!
6. webserver (apache) configuration is checked for misconfiguration (as imap-
functions start from webserver environment).Nothing found.
Test script:
---------------
<?php
if(extension_loaded("imap"))
{
echo "<pre>imap loaded</pre>";
}else{
echo "<pre>imap not loaded</pre>";
}
$mbox = imap_open("{XXXXX.com:143/novalidate-cert}","user_name","user_pass");
if($mbox !== FALSE)
{
$list = imap_list($mbox,"{XXXXX.com:143/novalidate-cert}","*");
}else{
echo"<br>","The stream is closed!";
}
?>
Expected result:
----------------
An array containing the names of the mailboxes ($list).
Actual result:
--------------
imap loaded
Notice: Undefined variable: mbox in /usr/lib/cgi-bin/PPP.php on line 24 Fatal
error: Call to undefined function  imap_list() in /usr/lib/cgi-bin/PPP.php on
line 27
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60578&edit=1