PHP 4.0 Bug #7816 Updated: Imap + mysql fails

From: Date: Tue, 27 Feb 2001 22:28:16 +0000
Subject: PHP 4.0 Bug #7816 Updated: Imap + mysql fails
Groups: php.dev 
Request: Send a blank email to php-dev+get-47646@lists.php.net to get a copy of this message
ID: 7816 Updated by: sniper Reported By: jlhaase@iland.net Old-Status: Open Status: Closed Bug Type: IMAP related Assigned To: Comments: || --> OR Previous Comments: --------------------------------------------------------------------------- [2000-11-14 12:44:18] jlhaase@iland.net Opening a connection to a mysql database server before opening a connection to an imap server appears to fail. In a script that I was testing a opened a mysql database to authenticate a user to a RADIUS table before opening an imap connection for the user. The imap_open function returned something other than false, however subsequent calls to that imap connection would fail. Specifically doing... <? $db_server = "my.db.server"; $db_username = "username"; $db_password = "*****"; $mailbox = "{myimap.server.com:143}INBOX"; $imap_user = "myimapuser"; $imap_password = "myimappassword"; $mysql_connection = mysql_open($db_server, $db_username, $db_password); $mbox = imap_open($mailbox, $imap_user, $imap_password); || die("imap didn't work: " . imap_last_error()); echo "This is my imap stream: " . $mbox . "<br>"; if (imap_ping($mbox)) { echo "Imap is alive!<br>"; } else { echo "Imap is dead!<br>"; } ?> Will always result in an output of This is my imap stream: 1 (or some other number) Imap is dead! However simply reversing the order of the mysql_open and imap_open statements so that you open the imap connection first seems to allow both imap and mysql to function correctly. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=7816&edit=2

« previous php.dev (#47646) next »