What steps will reproduce the problem?
1. php -q server.php
2. localhost/paginajuegos/cliente.html
3. write and send comand in the client
What is the expected output? What do you see instead?
C:\wamp>c:/wamp/bin/php/php5.4.3/php.exe -q c:/wamp/www/paginajuegos/server.php
Server Started : 2015-07-27 10:29:41
Master socket : Resource id #4
Listening on : localhost port 8085
PHP Strict standards: Only variables should be passed by reference in C:\wamp\w
ww\paginajuegos\server.php on line 14
PHP Stack trace:
PHP 1. {main}() C:\wamp\www\paginajuegos\server.php:0
Strict standards: Only variables should be passed by reference in C:\wamp\www\pa
ginajuegos\server.php on line 14
Call Stack:
0.0013 296408 1. {main}() C:\wamp\www\paginajuegos\server.php:0
PHP Strict standards: Only variables should be passed by reference in C:\w
ww\paginajuegos\server.php on line 14
PHP Stack trace:
PHP 1. {main}() C:\wamp\www\paginajuegos\server.php:0
Downloadad server.php proyect on 2015-07-26
For the client, i have two code:
WebSocket.html
<!DOCTYPE html>
<html lang="es">
<head>
<title>WebSocket</title>
<link rel="stylesheet" href="websocket.css">
<script src="websocket.js"></script>
</head>
<body>
<section id="cajaformulario">
<form name="formulario">
<p>Comando:<br><input type="text" name="comando" id="comando"></p>
<p><input type="button" name="boton" id="boton" value="Enviar"></p>
</form>
</section id="cajadatos"></section>
</body>
</html>
and
websocket.js
function iniciar(){
cajadatos=document.getElementById('cajadatos');
var boton=document.getElementById('boton');
boton.addEventListener('click', enviar, false);
socket=new WebSocket("ws://localhost:8085/paginajuegos/server.php");
socket.addEventListener('message', recibido, false);
}
function recibido(e){
var lista=cajadatos.innerHTML;
cajadatos.innerHTML='Recibido: '+e.data+'<br>'+lista;
}
function enviar(){
var comando=document.getElementById('comando').value;
socket.send(comando);
}
window.addEventListener('load', iniciar, false);
What version of the product are you using? On what operating system?
Download server.php from proyect home on 2015-07-26
server and client in windows 7 enterplease 64bits
wampserver 2.2 with php 5.4.3
google chrome Versión 44.0.2403.107 m (64-bit)
Please provide any additional information below.
there is any inconsistency or am I doing something wrong ?
how could it work ?
Original issue reported on code.google.com by rgabarre@yahoo.es on 27 Jul 2015 at 10:59
Original issue reported on code.google.com by
rgabarre@yahoo.es
on 27 Jul 2015 at 10:59