Nothing is unexpected.
Porting from Linux to Windows C ++ProgramThe socket and thread library must be transformed.
One day, I suddenly thought that windows could use the pthread library? There is a thread solution for searching.
1. Download:
First, download pthreads extension
Download Address: Http://windows.php.net/downloads/pecl/releases/pthreads
Second, to determine whether PHP is TS or NTS version
Through Phpinfo (); Look at the thread Safety item in it, this project is to see if
Php installs threads multi-threaded extension php5.3 or later and is a thread-safe version. The compiler used by apache and php must be consistent. Use phpinfo () to check that ThreadSafety is enabled, which is the thread Security Edition. You can
First, download pthreads extension
Download Address: Http://windows.php.net/downloads/pecl/releases/pthreads
Second, to determine whether PHP is a TS or NTS version
Through Phpinfo (); Look at the thread Safety entry, this item is to see if it is
The following is about the PHP multithreading problem, php pthreads extension and curl_multi_init function, when you encounter such problems will not be solved, see how others are solved.
Windows install PHP Real multi-threaded extension pthreads
Php5.3 or later, and is a thread-safe version. The Compiler used by apache and php must be the same. If ThreadSafety is set to enabled through phpinfo (), the thread-safe version is used. If you use phpinfo () to view the Compiler item, you can know
php5.3 or more, and is a thread-safe version. The compilers used by Apache and PHP must be consistent.
Thread-safe version is phpinfo () to view thread safety as enabled.
You can see the compiler that is used by phpinfo () to view the compiler item.
: This article describes how to install threads multi-thread extension in php. if you are interested in the PHP Tutorial, refer to it. Php5.3 or later, and is a thread-safe version. The compiler used by apache and php must be consistent.
Use phpinfo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.