You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to modify the first line to the path of php as follows
`
#! /usr/bin/php7.0
users as $u) {
$message = htmlspecialchars($message);
$this->send($u,$message);
}
}
protected function connected($user) {
}
protected function closed($user) {
}
}
$server = new ChatServer("192.168.0.3","9000");
`
When I run it using ./chatserver.php
`wh33t@wh33tserv:/var/www/html/d30/socketest$ ./chatserver.php
Server started
Listening on: 192.168.0.3:9000
Master socket: Resource id #6
wh33t@wh33tserv:/var/www/html/d30/socketest$
`
It just exits. I haven't modified anything else. What am I doing wrong?
Also, not sure why the formatting isn't working.
The text was updated successfully, but these errors were encountered:
I have plans to add logging, but obviously that doesn't help right now.
I suspect that something is happening to the master socket resource between when it's created and when you get your first connection (or even actually listening for that connection), but that's pure conjecture on my part.
I had to modify the first line to the path of php as follows
`
users as $u) { $message = htmlspecialchars($message); $this->send($u,$message); } } protected function connected($user) { } protected function closed($user) { } } $server = new ChatServer("192.168.0.3","9000"); ` When I run it using ./chatserver.php `wh33t@wh33tserv:/var/www/html/d30/socketest$ ./chatserver.php Server started Listening on: 192.168.0.3:9000 Master socket: Resource id #6 wh33t@wh33tserv:/var/www/html/d30/socketest$ ` It just exits. I haven't modified anything else. What am I doing wrong? Also, not sure why the formatting isn't working.#! /usr/bin/php7.0
The text was updated successfully, but these errors were encountered: