Scodigo, Inc.

Log In | Register

Cart Items:
0

Can't make secure connection

I'm trying to open a secure connection to a sever using stream_socket_client and get a whole slew of errors starting with:
PHP Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in Embedded code on line 1

I copied working php code over--it runs on the same Mac from the web browser (I can type in localhost/command.php and it runs fine), just not from here...

Does this function work in php within SmartPill?--maybe an example of making a connection of this type would help if it's possible. This is one of those things that's so far down in things (Filemaker, then SmartPill, then PHP code), that I don't know exactly where it's bombing...but like I said, just the php works fine.

On another note, is there a json_encode function somewhere? It didn't get recognized when I tried to use it so I manually set the json.

Can't make secure connection

Micah Woods's picture

Hello Ken,

If you post your code, I'm happy to give it a try and see if I can help.

In regards to json_encode, this function should be supported. I tried an example from the PHP manual and it works fine for me:

$arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);

echo json_encode($arr);

Regards,
Micah