php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60578 IMAP-functions don't work!
Submitted: 2011-12-20 22:18 UTC Modified: 2015-09-06 04:22 UTC
Votes:5
Avg. Score:4.6 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: profymath at yahoo dot com Assigned: cmb (profile)
Status: No Feedback Package: IMAP related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: profymath at yahoo dot com
New email:
PHP Version: OS:

 

 [2011-12-20 22:18 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-21 16:20 UTC] profymath at yahoo dot com
One more option!
 [2011-12-21 16:22 UTC] profymath at yahoo dot com
7. safe_mode = Off
 [2015-04-04 18:04 UTC] kalle@php.net
Is this still present in 5.6?
 [2015-08-29 18:01 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-08-29 18:01 UTC] cmb@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


The actual result is unlikely to be the result of running the
supplied test script (note the line numbers, and most importantly
the notice about $mbox being undefined). Furthermore the tested
PHP version is not irrelevant.
 [2015-09-06 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Jan 18 05:01:23 2021 UTC