Install php extension pthreads to implement PHP multithreading. the following two compilation methods are introduced:
1. compile pthreads extension on existing PHP
Note: The pthreads module needs to be dynamically loaded. before compiling php, -
PHP pthreads Multi-threaded installation and use, Pthreads multithreading
Install pthreads basically need to recompile PHP, plus--enable-maintainer-zts parameters, but with this document very few, bug will be many very many unexpected problems,
Here are two ways to compile:
1. Compiling pthreads extensions on existing PHP
Note: You need to dynamically load the Pthreads module, you must enable--ENABLE-MAINTAINER-ZTS before compiling PHP, otherwise you will need to recompile PHP.
We often run into a situation where the development environment is developed under Windows, and the production environment is actually Linux. Windows will work properly, but after uploading to Linux, you won't be able to play well. Then began a
Install pthreads basically need to recompile PHP, plus--enable-maintainer-zts parameters, but with this document very few, bug will be many very many unexpected problems, build environment can only hehe, so this thing to play even, True
Environment CentOS 6.3 64bit,php 5.4.5 pthreads need thread security environment download PHP installation package, unzip: Tar zxvf php-5.4.5.tar.gz//name is not I'm not sure about this. Download Install:
Environment CentOS 6.3 64bit, php 5.4.5 pthreads need thread security environment, download the php installation package, unzip: tar zxvf php-5.4.5.tar.gz // name is not this I'm not sure, go to download and install myself :. /configure --
PHP Extended Download: https://github.com/krakjoe/pthreadsPHP Manual Documentation: http://php.net/manual/zh/book.pthreads.phpInstall script
The code is as follows
Copy Code
#!/bin/sh cd/web/soft/php If [-D
{Code ...} the above is the execution process according to the error: configure: error: Cannotfindlibz check zlib is also installed, it is not clear why the error is supplemented with php55, apache24, mysql, etc. are brew installed
brew install php55
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.