Reply to Request for help with fsockopen

Your name:

Reply:


Posted by Alex on 01/17/07 16:21

Hi all,
I'm having a problem with fsockopen function, I'm programming with php
4.3 and need to do an HTTP POST over secure socket, ssl, here's my
code:

$context = stream_context_create();
$result = stream_context_set_option($context, 'ssl', 'local_cert',
"/certificate/cert.pem");
$result = stream_context_set_option($context, 'ssl', 'passphrase',
"passphrase");

$sock = fsockopen("ssl://myhost", 443 , $errno, $errstr, 30, $context);
if (!$sock) die("$errstr ($errno)\n");

I get this error when trying to run this code:
Warning: fsockopen(): Unable to set local cert chain file
`/certificate/cert.pem'; Check that your cafile/capath settings include
details of your certificate and its issuer in /path/to/file.php on line
xxx

Dunno what to do, I thought there's something wrong in my certificate
but couldn't find any real explanation on google or php site, If anyone
can help, it would be much appreciated.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация