Not work with async
santutu opened this issue · 12 comments
hi
i had this issue. what is the soloution?
Hi @hannanstd, Are you have PCNTL extension?, What's your OS?
@vuongxuongminh
yes it is enabled.
i use ubuntu 20 and apache2 on localhost, nginx on production server.
Can you show your running code?
You're welcome, How about posix extension? Are you install it?
i guess the problem.
when is use php -i | grep pcntl
it shows support => enabled
, but when is use extension_loaded('pcntl')
it returns false
Can you share your code? Like above but loop 20?
Maybe an exception have been throw, try to run:
Async::run(function() {
}, [
'error' => function(\Exception $e) {
dump($e);
}
]);
If exception throw, please ensure your package version's latest: composer show vxm/laravel-async
yes. i had an error. the error: "PHP Warning: Module 'pcntl' already loaded in Unknown on line 0
i fixed it and now all things is okey.
i prepared an installation guide for instal PCNTL on ubuntu and hopefull for other users:
https://stackoverflow.com/a/64634134/6937189
thanks alot for yout awesome package.