swoft使用记录
执行命令安装swoft
composer create-project swoft/swoft swoft |
报错1
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
解决方法:php开启proc_open函数
报错2
Your requirements could not be resolved to an installable set of packages.
Problem 1
– The requested PHP extension ext-redis * is missing from your system. Install or enable PHP’s redis extension.
解决方法:安装php redis扩展
执行
// HTTP启动服务
php bin/swoft http:start
访问 http://111.230.6.126:18306/ 即可使用http服务
报错3
执行重启http命令php bin/swoft http:restart报错如下:
(CONSOLE)Swoole\Exception: failed to listen server port[0.0.0.0:18306], Error: Address already in use[98]
解决方法,守护模式下,无法使用此命令,php bin/swoft http:start开启http服务,然后新开一个命令模式窗口.