Mosquitto-PHP icon indicating copy to clipboard operation
Mosquitto-PHP copied to clipboard

Segmentation fault error with TLS

Open cBevilaqua opened this issue 5 years ago • 0 comments

Hello,

I'm trying to connect but i'm getting the error: [1] 91694 segmentation fault

My code is:

`<?php $client = new Mosquitto\Client('Ruckus'); $client->onConnect(function($code, $message) use ($client) { $client->subscribe('1.0.0/LOC/SPOT_GPB/#', 0); });

$client->onMessage(function($message) { echo $message->topic, "\n", $message->payload, "\n\n"; });

$client->onLog(function($message) { echo $message; });

// set tls psk $identity = 'vspot'; $key = '3132333435363738'; $client->setTlsPSK($key, $identity); $client->setTlsInsecure(true); $client->setTlsOptions(Mosquitto\Client::SSL_VERIFY_NONE, 'tlsv1.2', null);

$client->connect('192.168.4.60', 8883); $client->loopForever();`

I'm using PHP 7.2.16 on Mac OSX 10.14.5

Do you have some idea of what could be causing the error? Thanks!

cBevilaqua avatar Oct 07 '19 14:10 cBevilaqua