我已经使用-enable-zts ()安装了php7构建,并且它工作正常
现在我需要添加pthread扩展(),但得到一些错误:
In file included from /home/pthreads/php_pthreads.c:47:0:
./src/copy.h:113:8: error: unknown type name ‘zend_live_range’
static zend_live_range* pthreads_copy_live(zend_live_range *old, int end) {
^
./src/copy.h:113:44: error:
我使用的是Ubuntu 14.10 (c9.io),并将php从5.6升级到7.2。
我需要使用apache2的多线程的pthread。我正在尝试使用sudo pecl install pthread来安装pthread
但这给出了以下错误:
checking whether to enable pthreads... yes, shared
checking whether to enable AddressSanitizer for pthreads... no
checking whether to enable dmalloc for pthreads... no
checking f
我有一个函数来计算这样的积分:
/* Complete this function to perform the trapezoidal rule using pthreads. */
void *compute_using_pthreads(void *inputs)
{
double integral;
int k;
threadParams *args = (threadParams *) inputs;
float a = args->a;
float b = args->
在我通过Apache2和PHP5通过apt-get安装了Ubuntu (14.04)之后,我正在尝试让线程在Ubuntu上运行。我的第一步:
已安装apache2 - apt-get install apache2
安装了带有常用模块php5的apt-get install php5 libapache2-mod-php5 php5-mcrypt ...
然后,我按照本教程的要求运行():
1 - Get PHP version
For this example we will use version: 5.4.36
# wget http://www.php.net/dist
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads CMake Error at /usr/share/cmake/Modules/CheckLibraryExists.cmake:41 (try_compile): Only libraries ma
我不确定做这件事的最好方法是什么,在这方面的一些建议会有所帮助
代码:
#Else where in different file and included in this makefile i have
LIBRARY_LIST := CONFIG_MTS_PTHREADS
CONFIG_MTS_PTHREADS := y
collect-compilation:
if [ $(strip $(CONFIG_MTS_PTHREADS)) == y ]; then \
echo "ok"; \
我试图在我的php代码中包含线程,但是我无法理解pthreads,每次运行我的程序时都会遇到以下错误:
Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_pthreads.dll' - The specified module could not be found.in Unknown on line 0
我遵循每一步所需:
I've added the file pthreadVC2.dll in my "C:\php" folder
I've added
所以我在pthread join中遇到了这个问题,它会给我segfault,或者永远在那里等待。我在这里尝试做的是一个pthreaded TCP客户端服务器,其中pthread位于客户端。我注释掉了所有的东西,除了仍然不能工作的连接。
问题主要出现在pthread上,它将在pthread_join上停止并永远不会继续。下面是当我尝试建立4个连接时,连接成功,通过pthread,它没有做任何事情。
调试测试运行:
./test 128.114.104.230 4443 5
begins
on top of forloop
forloop #0
forloop top of strcat #0
我对PHP中的线程有一个问题。
当我启动apache时,会看到这样的错误:
php.exe - Entry point not found
The procedure entry point was not found _zend_hash_update@@12 in library D:\xampp\php\ext\php_pthreads.dll
当我在CMD中执行脚本时,我有一个警告:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: D:\xampp\
我正在尝试实现多个上传功能(同时上传到多个地方)。我在windows (XAMPP + PThreads DLL)上成功地实现了这一点,但是在安装php+php-pel-p线程s.x86_64和扩展线程类时,我得到了错误:
include(Thread.php): failed to open stream: No such file or directory
我尝试添加所有与pthreads.so相关的php.ini:
/usr/lib64/php/modules/pthreads.so
/usr/lib64/php-zts/modules/pthreads.so
/usr/lib64/li
嗨,我正试图在php中实现线程。到目前为止,我所读过的东西都是为了这个目的而使用的。
我已经阅读了下面的php安装指南:
在下载pthreads安装zip之后,我解压缩了它&将以下文件放置在各自的位置:
移动
php_pthreads.dll to the 'bin\php\ext\' directory.
Move pthreadVC2.dll to the 'bin\php\' directory.
Move pthreadVC2.dll to the 'bin\apache\bin' directory.
在从GNU存档下载并解压缩libmicrohttpd之后,我做了通常的操作:./configure。但是,configure停止报告错误。以下是最后几行相关内容:
checking for pthread_create in -lpthread... no
checking if compiler supports -pthread... no
checking if compiler supports -pthreads... no
checking if compiler supports -threads... configure: error: Your system is not s