Comments (6)
I too have same problem. There is some problem when you run code in Ubuntu. But
the same code is working fine in Fedora 13 + Chrome.
I guess some modification need to be done in coding.
Original comment by narendra.sisodiya
on 10 Jul 2010 at 4:17
from phpwebsocket.
I am having the same problem and I am running on OS X with Chrome 6.0.458.1 dev.
Original comment by [email protected]
on 19 Jul 2010 at 12:23
from phpwebsocket.
I just had a similar issue on Ubuntu 10.04 LTS 32-bit and Chrome 5.0.375.125 .
But I'm using a fork of this project, namely phpwebsockets (notice the trailing
s). Download file from this tutorial:
http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-t
oday/ and extract it in a folder called 'socket' in your webroot. This folder
now contains a readme.txt and the folders 'server' and 'client'. Now start the
script in the console according to the readme (for me it was: sudo php -q
/var/www/socket/server/startDaemon.php ). It should print 'Start listening on
Socket.' . Leave the console window open. Now go to
http://localhost/socket/client/client.php in Chrome (make sure you don't have
any other tabs running, just this one). It should say 'Socket Status 0' and if
you look in the console you see no new messages (no connection was made).
Now here comes the trick: open a second Chrome tab. Point this tab to the same
url: http://localhost/socket/client/client.php (It also says 'Socket Status
0'). And then close it again. Your original tab should now say 'Socket Status:
1 (open)' and in the console you see a handshake was made. Et voila, there you
have phpwebsockets working!
BTW it seems the script starts working exactly at the time the second tab is
closed. Some weird behaviour by Chrome or the script, I don't know.
Original comment by [email protected]
on 6 Aug 2010 at 10:01
from phpwebsocket.
Update: just did the same trick as above but this time using Node.JS with the
Socket.IO script (this is server-side JavaScript, not PHP). The chat example
included in Socket.IO-node ( http://github.com/LearnBoost/Socket.IO-node ) had
the same issue, hanging at the 'Connecting...' stage. Opening a second tab and
then closing it again solved the problem and the chat box proceeded to load
properly. The Node.JS server confirmed the connection in the console.
So this problem we are seeing is most likely a Chrome issue.
Original comment by [email protected]
on 6 Aug 2010 at 10:31
from phpwebsocket.
I met the same problem, but a little different.
I'm in WIN7 and Chrome 6.0.472.63.
when I connect to server, the server will say the client connected. But there's
only "WebSocket - status 0" in client-side.
I use the trick mentioned above, but it doesn't work. The server says "done
handshaking", but the client won't say "Socket Status: 1(open)", just "0".
Is that the problem for the new version of Chrome? I'm confused...
Original comment by [email protected]
on 12 Oct 2010 at 1:44
from phpwebsocket.
Issue 16 can work. That's cool....
Original comment by [email protected]
on 12 Oct 2010 at 1:54
from phpwebsocket.
Related Issues (20)
- Decode broken when multiple calls same time
- Use on own Webspace on Strato
- what is" function $ (id)" is exactly doing in client code?
- update new version
- can't run the app
- Running on windows HOT 1
- Several Clients
- Patch for /trunk/ phpwebsocket/server.php
- Space ' ' in directory name
- on send button click getting InvalidStateError HOT 1
- Getting weird characters at the server side. HOT 1
- Patch for /trunk/ phpwebsocket/server.php
- Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing HOT 1
- Patch for /trunk/ phpwebsocket/client.html
- Patch for /trunk/ phpwebsocket/websocket.class.php
- Patch for /trunk/ phpwebsocket/server.php
- Patch for /trunk/ phpwebsocket/client.html
- Patch for /trunk/ phpwebsocket/chatbot.demo.php
- socket_tcp_bind: tcp_socket: Can't assign requested address
- error in server in windows 7
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 phpwebsocket.