xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
534 stars 120 forks source link

Call to undefined function TelegramApiServer\Server\pcntl_fork() #59

Closed Ax3lFernus closed 3 years ago

Ax3lFernus commented 3 years ago

Hello, thank you so much for developing this amazing tool!

I was trying to start it on Windows 10 with PHP 7.4.15 but I am getting this error:

Fatal error: Uncaught Error: Call to undefined function TelegramApiServer\Server\pcntl_fork() in C:\Users\user\Desktop\TelegramApiServer-1.10.5\src\Server\Fork.php:9
Stack trace:
#0 C:\Users\user\Desktop\TelegramApiServer-1.10.5\server.php(77): TelegramApiServer\Server\Fork::run(Object(Closure))
#1 {main}
  thrown in C:\Users\user\Desktop\TelegramApiServer-1.10.5\src\Server\Fork.php on line 9

How could I solve?

xtrime-ru commented 3 years ago

Looks like php on windows don't have this extension. You need to disable health check.

Update your env file: https://github.com/xtrime-ru/TelegramApiServer/blob/master/.env.example#L53

HEALTHCHECK_ENABLED=0