2017-08-16 36 views
1

コマンドを実行しようとします。phpスレッドでサーバを起動できません

php -S localhost:8000 -t public 

それは次のようなメッセージ

[Wed Aug 16 23:04:41 2017] PHP Fatal error: The cli-server SAPI is not supported by pthreads in Unknown on line 0

Fatal error: The cli-server SAPI is not supported by pthreads in Unknown on line 0 [Wed Aug 16 23:04:41 2017] PHP Fatal error: Unable to start pthreads module in Unknown on line 0

Fatal error: Unable to start pthreads module in Unknown on line 0 [email protected]:~/workspace/distance$ php -S localhost:8000 -t public [Wed Aug 16 23:05:44 2017] PHP Fatal error: The cli-server SAPI is not supported by pthreads in Unknown on line 0

Fatal error: The cli-server SAPI is not supported by pthreads in Unknown on line 0 [Wed Aug 16 23:05:44 2017] PHP Fatal error: Unable to start pthreads module in Unknown on line 0

Fatal error: Unable to start pthreads module in Unknown on line 0

そのための可能な理由は何であるのか?

+1

pthreadsはApacheではサポートされていません! – zoubida13

+0

php -Sを起動する場所でpthreadの読み込みを削除できますか? –

答えて

1

pthreadsはapache(PHP-CGI)ではサポートされていないため、CLIバージョンでのみ使用できます。

SAPI Support

pthreads v3 is restricted to operating in CLI only: I have spent many years trying to explain that threads in a web server just don't make sense, after 1,111 commits to pthreads I have realised that, my advice is going unheeded.

So I'm promoting the advice to hard and fast fact: you can't use pthreads safely and sensibly anywhere but CLI.

Thanks for listening ;)

Quote from GitHub: pthreads

関連する問題