Comments (4)
In the latest version, the line 327 points to a blank line.
Which version of socket.io are you using ?
from elephant.io.
Undefined offset: 3 in /var/www/lib/ElephantIO/Client.php on line 327
I think to line 336 of /lib/ElephantIO/Client.php
.
$sess = explode(':', $res);
// ...
$this->session['supported_transports'] = array_flip(explode(',', $sess[3]));
When $res
is "60:60:60"
or "60::"
, it is error.
Therefore, I think like next.
$sess = explode(':', $res, 4);
if (count($sess) === 4) {
$this->session['sid'] = $sess[0];
$this->session['heartbeat_timeout'] = $sess[1];
$this->session['connection_timeout'] = $sess[2];
$this->session['supported_transports'] = array_flip(explode(',', $sess[3]));
if (!isset($this->session['supported_transports']['websocket'])) {
throw new \Exception('This socket.io server do not support websocket protocol. Terminating connection...');
}
} else {
return false;
}
from elephant.io.
I was using socket.io 1.0.6
, I changed it into 0.9.16
and now its working fine, for the first 2-5 minutes after restarting the node.js server it started showing info: undefined socket url
and later it vanished. Anyway its working fine now, Thanks everyone for your help.
from elephant.io.
So yeah, the lib is not yet compatible with 1.X versions of Socket.IO. We working on it with the refacto-3.0 branch :)
from elephant.io.
Related Issues (20)
- SSL routines:SSL_write:protocol is shutdown HOT 7
- In Version1X.php line 194: Notice: Undefined index: upgrades HOT 8
- Set headers over SSL HOT 2
- readBytes while when fread return empty string
- Read and emit message from php HOT 1
- Path in socket connection HOT 1
- Get Session for distribute login user data?
- Slowness issue HOT 1
- oncesk/elephant.io for php7 HOT 1
- socket.io 3 HOT 9
- connect to socket io of ws://
- connection event not being called HOT 2
- An error occurred while trying to establish a connection to the server HOT 4
- Is Elephant.io can be used to connect through websocket?
- elephant.io is 100% down hard. HOT 1
- Fatao Error: ServerConnectionFailureException HOT 2
- did someone tried to use it with socket.io version 4x ? HOT 1
- suddenly can't establish connection with server HOT 4
- Using Version2X but getting a Version1X error ? HOT 4
- UnexpectedValueException "The server returned an unexpected value. Expected "HTTP/1.1 101", had "HTTP/1.1 400"" #217 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elephant.io.