Skip to content

WSS connection fails on OpenWRT with Linux 4 Kernel and PHP 5.6.16 #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
richardklingler opened this issue May 31, 2016 · 3 comments
Closed

Comments

@richardklingler
Copy link

Client works perfectly on OpenWRT with Linux Kernel 3.10.49 and PHP 5.4.38.

But fails when upgraded to Linux 4.1.13 and PHP 5.6.16 on OpenWRT with:

Fatal error: Uncaught exception 'WebSocket\ConnectionException' with message 'Could not open socket to "myserver.com:443": (0).' in /www/ws/lib/Client.php:65
Stack trace:
#0 /www/ws/lib/Base.php(122): WebSocket\Client->connect()
#1 /www/ws/wsclient.php(38): WebSocket\Base->receive()
#2 {main}

thrown in /www/ws/lib/Client.php on line 65

Runs fine though on Ubuntu with Kernel 3.16.7 and PHP 5.6.20.

@fiddur
Copy link
Contributor

fiddur commented Jun 7, 2016

Weird, it fails on the native stream_socker_client then; sounds like an error in that PHP compilation.

Have you tried removing the @ on https://github.com/Textalk/websocket-php/blob/master/lib/Client.php#L85

Should give the same error info, but you never know with PHP…

@richardklingler
Copy link
Author

Hello

Sorry for late reply...long time not logged into github (o;

Found the reason now why the connection failed....seems to be OpenWRT specific...

Besides the /etc/certs/* files I had on the module...I needed to also install the OpenWRT package "ca-certificates".....

Now all runs smoothly again ;-)

@fiddur
Copy link
Contributor

fiddur commented Aug 3, 2016

Ok, great :)

@fiddur fiddur closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants