#19987 [Com]: supplied argument is not a valid imap resource.

From: Date: Sat, 19 Oct 2002 03:06:46 +0000
Subject: #19987 [Com]: supplied argument is not a valid imap resource.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22819@lists.php.net to get a copy of this message
ID: 19987 Comment by: root@blackdevil.da.ru Reported By: root@blackdevil.da.ru Status: Open Bug Type: IMAP related Operating System: Debian GNU Linux 3.0 woody PHP Version: 4.2.2 New Comment: P.S. IMAP package was compiled using "make slx". PHP is bound to apache via APXS. Apache version: 1.3.26. And the same situation I relive on Windows XP with the same version of Apache and PHP. php_imap.dll was added to PHP.INI and will be loaded (was tested through process module list). I've tested enought software like NOCC using imap and no one package did worked. Previous Comments: ------------------------------------------------------------------------ [2002-10-18 22:03:07] root@blackdevil.da.ru Hello, I'm trying to use IMAP module under PHP. I've written the simple script which works well on the server of my ISP but when I try to launch it on my own system (Debian GNU Linux 3.0 woody) I always get "supplied argument is not a valid imap resource". There is no matter which statements do I use: imap_check, imap_close or anything other. imap_open() establishes POP3 connection as well. But any further requests fail. ./configure --prefix=/srv/php --with-apxs=/srv/apache/bin/ --with-imap=/arch/build/imap-2003.RC3 I've already tried to config & compile it with libc-client distributed with Debian. There is no difference. It produces always the same error. Here is my test script (taken from imap_open() notes): <?PHP $ConnStr="{192.168.0.1:110/pop3}INBOX"; $mbox = imap_open($ConnStr, "my_login_name", "my_password") || die ("can't connect: " . imap_last_error()); echo "<p><h1>Mailboxes</h1>\n"; $folders = imap_listmailbox ($mbox, $ConnStr, "*"); if ($folders == false) { echo "Call failed<br>\n"; } else { while (list ($key, $val) = each ($folders)) { echo $val."<br>\n"; } } echo "<p><h1>Headers in INBOX</h1>\n"; $headers = imap_headers ($mbox); if ($headers == false) { echo "Call failed<br>\n"; } else { while (list ($key,$val) = each ($headers)) { echo $val."<br>\n"; } } imap_close($mbox); ?> Following does it reply so far i call it from browser: Warning: imap_check(): supplied argument is not a valid imap resource in /home/serve/public_html/imap.php on line 7 imap_check() failed: Warning: imap_close(): supplied argument is not a valid imap resource in /home/serve/public_html/imap.php on line 25 Thanks & regards ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19987&edit=1

« previous php.bugs (#22819) next »