I have a php script with imap functions. All is fine when I call the php file from browser, but when it run with cronjob the following error:
X-Powered-By: PHP/5.3.27
Set-Cookie: bgm=31dc5ff02b6a3d1614a9dd1c39321fd0; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html
<br />
<b>Warning</b>: imap_open() [<a href='function.imap-open'>function.imap-open</a>]: Couldn't open stream {"hostname":993/imap/notls/ssl} in <b>/"path"/cron.php</b> on line <b>173</b><br />
<br/><br/><span style='color:red'></span><pre>Certificate failure for "hostname": unable to get local issuer certificate: /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA</pre><br/><br/><br />
OS: CentOS 5.9 The cronjob was created with Cpanel: /usr/bin/php file.php. The imap_last_error() give the following error: Certificate failure for "hostname": unable to get local issuer certificate: But when i call the cron.php from any browser that certificate failure doesn't come and all works fine.