new php parallel. it's new and there is no troubleshooting about it anywhere and the only documentation about it, is php.net itself which is not enough.
this is what I did (per instructions):
php_parallel.dll
to php/ext directory.extension=parallel
to php.ini.<?php
# this is my code
$runtime = new \parallel\Runtime();
$future = $runtime->run(function(){
for ($i = 0; $i < 50; $i++)
echo "$i";
return "easy";
});
for ($i = 0; $i < 50; $i++) {
echo ".";
}
hours spent. now windows cmd says:
"Fatal error: Uncaught Error: Class 'parallel\Runtime' not found in ...[my file address]"
and wampserver says "The connection was reset (firefox error)" only on the page I use parallel\Runtime and the other pages work fine.
and please with all do respect don't mark my question as broad one or any other things if you simply don't know the answer. at least show me some links.
As far as I can tell, to install an extension from a .dll provided by PECL, the following need to match between your extension and your PHP build, found in phpinfo()
:
PHP Version
PHP Extension Build
(TS=threadsafe or NTS=not-threadsafe)PHP Extension Build
(eg: VS15 or VS16)Architecture
On the PECL repository for parallel, you should check latest updated version and the package names are self-explanatory, so you can choose your desired one, i.e. ... 7.3-ts-vc15-x64
Note (maybe does not apply now):
Given the limited builds of parallel
, your PHP Build must be: 7.3+, TS, and VC15. Double-check that this is indeed the case for you by looking at your phpinfo()
, and also be sure you are using the x64
version (since you said your PHP is x64).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With