简体   繁体   English

PHP Pthreads最新版本3.1.6(64bit)未安装在Apache上

[英]PHP Pthreads latest version 3.1.6 (64bit) not installing on Apache

I am trying to install latest pthreads extension 3.1.6 64bit for PHP. 我正在尝试为PHP安装最新的pthreads扩展3.1.6 64位。

As per the author advice of pthreads, on http://github.com/krakjoe/pthreads 根据pthreads的作者建议,请访问http://github.com/krakjoe/pthreads

I have placed the two dlls to the desired locations. 我已将两个dll放置到所需的位置。

Add pthreadVC2.dll (included with the Windows releases) to the same directory as php.exe eg. 将pthreadVC2.dll(Windows发行版随附)添加到与php.exe相同的目录中。 C:\\Apache24\\php Add php_pthreads.dll to PHP extention folder eg. C:\\ Apache24 \\ php将php_pthreads.dll添加到PHP扩展文件夹中。 C:\\Apache\\php\\ext C:\\ Apache \\ php \\ ext

And also in Windows\\system32 directory 并且也在Windows \\ system32目录中

And also added LoadFile in [Apache Http.confd][1] 并且还在[Apache Http.confd] [1]中添加了LoadFile。

And I have added added extension to my php.ini 并且我在php.ini中添加了扩展名

php.ini php.ini

But Apache won't start and when I check the apache error.log, I have the below 但是Apache无法启动,当我检查apache error.log时,我有以下内容

[Tue Jun 28 11:38:31.184618 2016] [ssl:warn] [pid 8640:tid 352] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name [2016年6月28日星期二11:38:31.184618] [ssl:warn] [pid 8640:tid 352] AH01909:本地主机:443:0服务器证书不包含与服务器名称匹配的ID

[Tue Jun 28 11:38:31.215819 2016] [core:warn] [pid 8640:tid 352] AH00098: pid file C:/Apache24/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [2016年6月28日星期二11:38:31.215819] [core:warn] [pid 8640:tid 352] AH00098:pid文件C:/Apache24/logs/httpd.pid被覆盖-先前Apache运行的不正常关机?

I have moved php_pthreads.dll extension to top of the extension list and to the bottom but no joy. 我已将php_pthreads.dll扩展名移至扩展名列表的顶部和底部,但没有任何乐趣。 It just won't start with this pthreads dll. 它只是不会从此pthreads dll开始。 But if I comment back ;extension=php_pthreads.dll , my Apache will restart but just not with this pthreads dll. 但是,如果我回复; extension = php_pthreads.dll,我的Apache将重新启动,但不会与此pthreads dll一起启动。

Is this a bug or am I doing something wrong? 这是一个错误还是我做错了什么?

Little info of my system setup Window 7 64 Bit, with Apache 2.4.x VC14 我的系统设置程序窗口7 64位的小信息 ,使用Apache 2.4.x VC14

PHP info PHP信息

  • System Windows NT NG10676 6.1 build 7601 系统Windows NT NG10676 6.1内部版本7601

  • (Windows 7 Enterprise Edition Service Pack 1) AMD64 (Windows 7企业版Service Pack 1)AMD64

  • Build Date Jun 21 2016 15:08:19 建立日期2016年6月21日15:08:19

  • Compiler MSVC14 (Visual C++ 2015) 编译器MSVC14(Visual C ++ 2015)

  • Architecture x64 建筑x64

  • Thread Safety enabled 启用线程安全

Please note I have all VC compilers installed on my system 10, 11, 14 all 64 bit and installed 32 bit as well just in case. 请注意,我的系统10、11、14上都安装了所有VC编译器,均为64位,并安装了32位,以防万一。

Please note, I have tried all previous threads about pthreads installation and they don't help with my installation. 请注意,我以前尝试过所有有关pthreads安装的线程,但它们对我的安装没有帮助。 I have tried every google page but they just don't work, any help would be appreciated. 我已经尝试了每个google页面,但它们都无法正常工作,我们将不胜感激。 If PHP pthreads designer can shed some light on this version. 如果PHP pthreads设计器可以阐明该版本。

Quote from README : 自述引述

pthreads v3 is restricted to operating in CLI only: I have spent many years trying to explain that threads in a web server just don't make sense, after 1,111 commits to pthreads I have realised that, my advice is going unheeded. pthreads v3仅限于只能在CLI中运行:我花了很多年的时间试图解释Web服务器中的线程是没有意义的,在对pthreads进行了1,111次提交后,我意识到我的建议被忽略了。

So I'm promoting the advice to hard and fast fact: you can't use pthreads safely and sensibly anywhere but CLI. 因此,我正在提倡关于事实的建议:除了CLI之外,您不能安全,明智地使用pthread。

Thanks for listening ;) 谢谢收听 ;)

Quote from blog explaining change from v2 来自博客的引文解释了v2的变化

... ...

EJB's expressly prohibit the programmer from creating threads by specification, and modern Java doesn't even have a 1:1 model. EJB明确禁止程序员按规范创建线程,而现代Java甚至没有1:1模型。 Obviously, this is mostly because the environment may be migrated (moved within a cluster of servers), moving threads outside of it's managed pool is difficult to imagine. 显然,这主要是因为可能会迁移环境(在服务器群集内移动环境),难以想象将线程移出托管池之外。 It goes further than prohibiting the creation of threads though, it prohibits the use of synchronization primitives, because what if a node is moved while you retain a lock - all hell breaks loose. 尽管它比禁止创建线程要走得更远,但它禁止使用同步原语,因为如果在保留锁的同时移动了节点,该怎么办-所有地狱都会崩溃。

In Java generally, you are discouraged from manually creating threads in Servlets, for all the same reasons I have discouraged it for pthreads. 通常,在Java中,不鼓励您在Servlet中手动创建线程,出于所有相同的原因,我不建议使用pthread。

While it's true that not every environment will actually prohibit it, it runs as deep as can be; 的确,并非所有环境都会实际禁止它,但它的运行范围尽可能深。 Everyone agrees that creating real (1:1) threads in a web response context is a bad idea. 每个人都同意在Web响应上下文中创建实际(1:1)线程是一个坏主意。

... ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM