PHP's imap_open using port 995

jpa7578

Guppy
Just wondering if anyone was successful in using PHP's imap_open and connecting to the POP3 server securely? I am able to connect to the usual 110. But when connecting at 995, I get an error. Here is a snippet of code:

PHP:
<?php

$imapres = imap_open("{mail.domain.tld:995/pop3/ssl/novalidate-cert}", "[email protected]", "thepassword");
if (!($imapres)) {
	die("Problem encountered when accessing server.");
} else {
	print("Connection to server was successfully established.");
	imap_close($imapres);
}

?>

Any help will be greatly appreciated! 8)
 
The code works on my development server.
On Win5 I get an error message because the IMAP functions extension doesn't seem to be installed.

On Web2 I get a different error which is kinda vague. My guess is that PHP was compiled without SSL support. That is, the --with-openssl and/or the --with-imap-ssl compile options are probably needed.

On Web I also get "Problem encountered when accessing server." but no PHP error along with it. Same when switching back to regular POP3. Which is odd, because I have a working Horde IMP install on there.
 
Stephen said:
IMAP can be installed on the windows servers on request.

This is true. In fact, I made a request for a custom PHP.INI and JodoHost support guys did it for me.

However that is not the issue. The issue is that imap_open not being able to open a connection to POP3 at port 995, at Win2. This maybe due to PHP compilation issues (see SubSpace's previous post).

So, what do you think Stephen?
 
The Windows version of PHP probably needs some OpenSSL DLLs installed somewhere rather than it needing to be recompiled.
 
Back
Top