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:
include(Thread.php): failed to open stream: No such file or directory
i tried adding all pthreads.so related to the php.ini:
/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.
Did anyone achieve this functionality and can shed some light on how to upload to multiple places at once / installing pthreads successfully on linux.
thanks, Danny
For 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
.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.