Giter VIP home page Giter VIP logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 14, 2024
Issue 16 can work. That's cool....

Original comment by [email protected] on 12 Oct 2010 at 1:54

from phpwebsocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.