博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
php 5.4 安装 pthreads
阅读量:4201 次
发布时间:2019-05-26

本文共 910 字,大约阅读时间需要 3 分钟。

1. 下载地址是这个:

https://github.com/krakjoe/pthreads

但是这个下载的是 版本3 也就是php 7 才能用的

我们需要使用2版本

然后刷新的页面如下,拖到最底部:

在下一页找到版本2的

下载下来,这个v2 才是php5才可以使用的

下载下来,安装:

或者,您直接这样下载:

cd /toolswget https://github.com/krakjoe/pthreads/archive/v2.0.10.zipunzip   v2.0.10.zipcd pthreads-2.0.10/usr/local/php/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-config  makemake install

注意:您的php 在编译的时候需要开启  --enable-maintainer-zts,

./configure --prefix=/usr/local/php --disable-fileinfo   --enable-fpm --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-openssl --with-zlib --with-curl --enable-ftp --with-gd --with-xmlrpc  --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --enable-mbstring --with-mcrypt=/usr/local/libmcrypt --enable-zip --with-mysql=/usr/local/mysql --without-pear --enable-maintainer-zts

vim /etc/php.ini

添加:

extension=pthreads.so

重启php/etc/init.d/php-fpm restart

你可能感兴趣的文章
【一天一道LeetCode】#93. Restore IP Addresses
查看>>
【一天一道LeetCode】#94. Binary Tree Inorder Traversal
查看>>
【一天一道LeetCode】#113. Path Sum II
查看>>
【一天一道LeetCode】#114. Flatten Binary Tree to Linked List
查看>>
【unix网络编程第三版】阅读笔记(二):套接字编程简介
查看>>
【一天一道LeetCode】#115. Distinct Subsequences
查看>>
【一天一道LeetCode】#116. Populating Next Right Pointers in Each Node
查看>>
【一天一道LeetCode】#117. Populating Next Right Pointers in Each Node II
查看>>
【一天一道LeetCode】#118. Pascal's Triangle
查看>>
【一天一道LeetCode】#119. Pascal's Triangle II
查看>>
【unix网络编程第三版】ubuntu端口占用问题
查看>>
【一天一道LeetCode】#120. Triangle
查看>>
【unix网络编程第三版】阅读笔记(三):基本套接字编程
查看>>
【一天一道LeetCode】#121. Best Time to Buy and Sell Stock
查看>>
【一天一道LeetCode】#125. Valid Palindrome
查看>>
【一天一道LeetCode】#231. Power of Two
查看>>
【一天一道LeetCode】#202. Happy Number
查看>>
带你深入理解STL之Vector容器
查看>>
带你深入理解STL之Deque容器
查看>>
带你深入理解STL之Stack和Queue
查看>>