1. Check whether PHP is a ts version or a ts version through phpinfo (); check the Thread Safety item. This project is to check whether it is Thread-safe. If it is: enabled, it should generally be a ts version, otherwise, the data is stored in the ETS.
2. Select the corresponding pthreads version based on the PHP ts version
The idea file package, where 0.1.0 indicates the current pthreads version number, 5.4 indicates the php version number, ts indicates the ts version corresponding to php, and vs9 indicates that it is compiled by the Visual Studio 2008 compiler, the last x86 version represents a 32-bit version.
Extract the packages to the pthreadvc2.dlland php_pthreads.dllfiles, put the vc2files in the same directory as php.exe, And put php_pthreads.dll in the extension directory. 1. Modify the php. ini file and add extension = php_pthreads.dll.
2. Modify the Apache configuration file httpd. conf and add LoadFile X:/PHP5/pthreadVC2.dll.
3. Restart the Apache server
Iv. Test pthreads Extension
Arg = $ arg;} public function run () {if ($ this-> arg) {printf (Hello % s, $ this-> arg );}}} $ thread = new AsyncOperation (World); if ($ thread-> start () $ thread-> join ();?>
Run the above code to get "HelloWorld". It indicates that the pthreads extension is successfully installed!