Open kelunik opened 7 years ago
I totally agree on this.
you can enable pthreads for script with -dextension
argument
and run script by command:
php -dextension=pthreads.so script.php
or add to file #!/usr/bin/php -dextension=pthreads.so
, e.g:
#!/usr/bin/php -dextension=pthreads.so
<?php
var_dump(class_exists('Thread'));
then make file executable and run it like ./script.php
P.S.: Please note the second way requires unix line-endings in file
That won't be possible. Instead of one single module check, this check would have to be done in every pthreads API method. But maybe we could silence the PHP_MINIT_FUNCTION
abortion by a param or ini setting, if that's technically feasible and would help?
Could the
The cgi-fcgi SAPI is not supported by pthreads
error message be delayed untilpthreads
is actually used instead of only loaded? That'd allow having a singlephp.ini
for all binaries / compilingpthreads
directly into the binaries instead of as shared extension.