php function imap_open failing when run through command line on windows with script
<p>I am running Windows Server 2012, and is also running apache and PHP on an intranet.</p>

<p>When I pull the script through <a href="http://localhost/script.php" rel="nofollow">http://localhost/script.php</a> it runs without issue and no problems.</p>

<p>When I run the same script through the command line with the prompt:
C:\wamp\bin\php\php5.3.3\php.exe C:\wamp\www\script.php</p>

<p>it dies at the line when it gets to imap_open.</p>

<p>Here is the full code:</p>

<pre><code>$hostname = '{email-host:995/pop3/ssl/novalidate-cert}INBOX';
$username = 'user';
$password = 'password';

$inbox = imap_open($hostname,$username,$password) or die('Cannot connect: ' . imap_last_error());
</code></pre>

<p>Any ideas on why it will not work through command prompt.</p>

<p>in php.ini, I have included:</p>

<pre><code>extension=php_imap.dll

extension=php_openssl.dll
</code></pre>