I follow the Ratchet instructions. On the SessionProvider page, the code is as follows:
<?php // Your shell script use Ratchet\Session\SessionProvider; use Symfony\Component\HttpFoundation\Session\Storage\Handler; use Ratchet\App; $memcache = new Memcache; // Class not found on line 7 $memcache->connect('localhost', 11211); $session = new SessionProvider( new MyApp , new Handler\MemcacheSessionHandler($memcache) ); $server = new App('localhost'); $server->route('/sessDemo', $session); $server->run();
PHP causes a fatal error when running a script in command-line :
Memcache class not found on line 7
This code is placed in bin \ chat-server.php
Wierd stuff
The class is not available only for chat-server.php script.
php ratchet
Rex overflow
source share