Open SpencerMalone opened 5 years ago
The project seems to have been no longer maintained by the author.
You can load extensions at runtime using dl() within child, just remove extension from php.ini
Note that dl() will not be available in ZTS builds (if php-go gets around to it for php7) and PHP-FPM doesn't allow dl().
I don't think (based on issues found in the golang repository) that we will see golang support for forking in shared c libraries anytime soon. If you fork and interact with golang objects and functions post-fork, you will eventually deadlock.
For example, in the current
example.php
:Take...
And rewrite it work a fork, based on the example @ https://www.php.net/manual/en/function.pcntl-fork.php
And you will see fairly quickly, it will deadlock. Here is a GIF:![Screen Capture on 2019-05-23 at 22-04-29](https://user-images.githubusercontent.com/8786752/58297751-d69a7280-7da6-11e9-9b41-c15087acac23.gif)
Knowing that this probably won't fixable anytime soon, and from what I can tell, PHP doesn't offer support for unloading and reloading extensions during forking, maybe we should put up a notice about it in the README? Unless anybody know of a theoretical way around this, which I would be very grateful for.