php - ratchet HttpServer class not found -
so made real-time chat on windows in php websockets , every thing worked when try run server on vps(debian) error
php fatal error: class 'ratchet\http\httpserver' not found in /react-chat/bin/server.php on line 11
so when @ server.php file :
<?php require __dir__ . '/../vendor/autoload.php'; use chat\chat; use ratchet\server\ioserver; use ratchet\http\httpserver; use ratchet\websocket\wsserver; $server = ioserver::factory(new httpserver(new wsserver(new chat)), 2000); $server->run();
every thing seems normal composer.json file
{ "require": { "cboden/ratchet": "~0.3" }, "autoload": { "psr-4": { "chat\\": "bin/src/" } } }
the warning got when doing composer install following
but dont warning making error
php namespaces case sensitive, try http
instead of http
:
use ratchet\http\httpserver;
Comments
Post a Comment