|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-02-27 17:27 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
This problem is similar to that I submitted in bug # 7816, however it expands on it. It appears that the imap_open function fails silently if you have used any other socket-type function previously in the script. Specifically I have seen this with calls to fsockopen, and also the mysql_connect functions. In a script that I have written I was trying to athenticate the user before calling the imap_open function, because the imap_open function takes so long to fail when given an incorrect username-password pair. Origanally I was trying to authenticate to a mysql radius database for authentication, however when the imap function refused to work with mysql_connect called prior to it, I tried using fsockopen to connect to the pop3 port on the server so that I could manually attemp authentication. However this produced the same results as the mysql attempt. Specifically I am calling a function for imap_open in the following manner... $mbox = imap_open("{my.mail.server:143}" . $mailbox, $username, $password) || die ("can't connect: " . imap_last_error()); This works fine unless I have call fsockopen or mysql_connect before this. If you use either of those functions prior to this statement in the php script however the imap_open function appears to succeed and a value is assigned to $mbox, however subsequent calls to imap functions attempting to use the "imap stream" stored in $mbox will fail with an error stating that $mbox is not a valid imap stream.