[英]PHP-FPM NGinx Pthreads Linux installation
I'm trying to achieve multiple upload functionality (upload to multiple places at once). 我正在尝试实现多种上传功能(一次上传到多个地方)。 I successfully achieved this on windows (XAMPP + PThreads DLL's) but when installing PHP-FPM+php-pecl-pthreads.x86_64, and extending the Thread class i'm getting the error: 我在Windows(XAMPP + PThreads DLL)上成功实现了这一点,但是在安装PHP-FPM + php-pecl-pthreads.x86_64并扩展Thread类时,出现了错误:
include(Thread.php): failed to open stream: No such file or directory
i tried adding all pthreads.so related to the php.ini: 我尝试添加所有与php.ini相关的pthreads.so:
/usr/lib64/php/modules/pthreads.so
/usr/lib64/php-zts/modules/pthreads.so
/usr/lib64/libpthread.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libmudflapth.so
/lib64/libpthread-2.12.so
but i'm getting 但我越来越
undefined symbol: core_globals_id in Unknown on line 0
on my phpinfo i see thread safety is disabled. 在我的phpinfo上,我看到线程安全已禁用。
Did anyone achieve this functionality and can shed some light on how to upload to multiple places at once / installing pthreads successfully on linux. 是否有人实现了此功能,并且可以阐明如何一次上传到多个位置/如何在Linux上成功安装pthreads。
thanks, Danny 谢谢,丹尼
For debian/ubuntu 对于debian / ubuntu
apt-get source php5
cd php5*
cd ext
git clone https://github.com/krakjoe/pthreads.git
cd .. && ./buildconf --force
./configure --help | grep pthre
./configure --enable-debug --enable-maintainer-zts --enable-pthreads --prefix=/usr --with-config-file-path=/etc --with-apxs2=/usr/bin/apxs2 --enable-fpm
make -j2
make -j2 install
php -m | grep pthreads
copy sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
user
and group
to the username which nginx use in /etc/init.d/php-fpm
. 将user
和group
更改为nginx在/etc/init.d/php-fpm
使用的用户名。
service nginx restart
cd <your-nginx-public-folder>
touch phpinfo.php && echo "<?php phpinfo();" >> phpinfo.php
go to your browser and search for pthreads in http://<your url>/phpinfo.php
just created php file 转到浏览器并在刚刚创建的php文件中的http://<your url>/phpinfo.php
搜索pthreads
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.