Php installation pthread prompt ClassThreadnotfound my php version is 5.6.16 the system is 64-bit download pthread for the php_pthreads-2.0.8-5.6-ts-vc11-x64.zip from phpinfo to view the Compiler MSVC11 (Visual C ++ 2012) for vc11, the version of the corresponding
My path is E: \ wamp64 \ bin \ php \ php5.6.16 \
Put php_pthreads.dll in the E: \ wamp64 \ bin \ php \ php5.6.16 \ ext \ directory.
Put pthreadVC2.dll in the E: \ wamp64 \ bin \ php \ php5.6.16 \ directory,
And put pthreadVC2.dll under the system32 directory,
You have also added environment variables and configured apache http. conf to add LoadFile "E:/wamp64/bin/php/php5.6.16/pthreadVC2.dll"
Modified php. ini extension = php_pthreads.dll
Run the following code after restarting apache:
class AsyncOperation extends Thread { public function __construct($arg){ $this->arg = $arg; } public function run(){ if($this->arg){ printf("Hello %s\n", $this->arg); } }}$thread = new AsyncOperation("World");if($thread->start()) $thread->join();
Still prompt
Class 'thread' not found
What is the possible cause?
Reply to discussion (solution)
Check whether the Phpinfo function is successfully loaded?
Http://m.blog.csdn.net/article/details? Id = 19020161
Http://m.blog.csdn.net/article/details? Id = 19020161
According to this tutorial, the prompt Class 'thread' not found phpinfo shows that php_pthread is not loaded.
And put pthreadVC2.dll under the system32 directory,
This operation is not available in this tutorial.
And put pthreadVC2.dll under the system32 directory,
This operation is not available in this tutorial.
No. after following this tutorial, the system prompts that this class cannot be found, so I have referred to other tutorials.
Later I referred to this tutorial http://www.thinkphp1.cn/topic/22676.html
Look at the official http://docs.php.net/manual/zh/book.pthreads.php
It seems that the installation is not successful. check whether phpinfo has been installed.
Look at the official http://docs.php.net/manual/zh/book.pthreads.php
It seems that the installation is not successful. check whether phpinfo has been installed.
Phpinfo does not
Look at the official http://docs.php.net/manual/zh/book.pthreads.php
Added according to official documents, or thread not found
Phpinfo does not indicate that the installation has failed. you can change to another version for installation.
Configuration error.
Thank you for your enthusiastic answers to the problem has been solved according to the http://docs.php.net/manual/zh/book.pthreads.php official tutorial configuration of My Integrated Environment wamp in php. when configured in ini, php under php is used. ini, but wamp does not load this php. ini later found php through the wamp icon. ini can be displayed only when the configuration is enabled