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

From: Date: Sat, 19 Oct 2002 03:03:07 +0000
Subject: #19987 [NEW]: supplied argument is not a valid imap resource.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22818@lists.php.net to get a copy of this message
From: root@blackdevil.da.ru Operating system: Debian GNU Linux 3.0 woody PHP version: 4.2.2 PHP Bug Type: IMAP related Bug description: supplied argument is not a valid imap resource. 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 bug report at http://bugs.php.net/?id=19987&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19987&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19987&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19987&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19987&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19987&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19987&r=support Expected behavior: http://bugs.php.net/fix.php?id=19987&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19987&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19987&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19987&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19987&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19987&r=dst IIS Stability: http://bugs.php.net/fix.php?id=19987&r=isapi

« previous php.bugs (#22818) next »