FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » imap_open: Certificate Error, but only in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
imap_open: Certificate Error, but only in PHP [message #179813] Sat, 08 December 2012 13:01 Go to previous message
Florian Zeisel is currently offline  Florian Zeisel
Messages: 3
Registered: December 2012
Karma:
Junior Member
Hi everyone,

this week, one of my php scripts suddenly stopped working. I received the following errors:
It started with: "unable to locate common name", then after a while it was "invalid remote specification".

The code is:
$srv = '{mail.twooit.com:993/imap/ssl/}';
$conn = imap_open($srv, $mailuser, $mailpass) or die("can't connect: " . imap_last_error());

It seems the provider installed a new certificate. Openssl on the terminal results in:
depth=1 /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=PositiveSSL CA 2
verify error:num=20:unable to get local issuer certificate
verify return:0

After some research, I was able to make it work by adding the "novalidate-cert" option. However, this means that the script does not authenticate the server anymore, which cannot be the solution! At least: Is it correct to assume that passwords and mails are still transferred encrypted? It might not be that much of a problem, because the script is also executed at that provider (different IP address though), and man-in-the-middle risk is therefore low..

HOWEVER, my Thunderbird email client and also smartphone are still connecting without any certificate errors and ssl-check websites say, that the certificate is ok...

Can anyone help me to fix this, please?

Thank you very much,
Florian
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to Prevent Apache Server From Hanging while running a batch file?
Next Topic: How to run program from php..?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 04:17:02 GMT 2024

Total time taken to generate the page: 0.04760 seconds