PHP Pthreads最新版本3.1.6(64位)不安装在Apache上 [英] PHP Pthreads latest version 3.1.6 (64bit) not installing on Apache

查看:296
本文介绍了PHP Pthreads最新版本3.1.6(64位)不安装在Apache上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装最新的pthreads扩展3.1.6 64位PHP。



根据pthreads的作者建议,在 http://github.com/krakjoe/pthreads



我把这两个将dll添加到所需的位置。



将pthreadVC2.dll(随Windows版本一起添加)添加到与php.exe相同的目录中。 C:\Apache24\php
将php_pthreads.dll添加到PHP扩展文件夹,例如。 C:\Apache\php\ext



而且在Windows \system32目录中



还在[Apache Http.confd] [1]中添加了LoadFile [/ b]

我已经添加了我的php.ini添加的扩展



php.ini



但是Apache不会启动,当我检查apache error.log时,我有以下


[Tue Jun 28 11:38 :31.184618 2016] [ssl:warn] [pid 8640:tid 352]
AH01909:localhost:443:0服务器证书不包含符合服务器名称的$ $ $ $ $ $ $ $ $
$ b

[Tue Jun 28 11:38:31.215819 2016]
[core:warn] [pid 8640:tid 352] AH00098:pid file
C:/ Apache24 / logs / httpd.pid被覆盖 - 以前的
不正常关机Apache运行?


我已将php_pthreads.dll扩展名移到扩展列表和底部,但没有喜悦。它不会从这个pthreads DLL开始。但是如果我发表评论,extension = php_pthreads.dll,我的Apache将重新启动,但是并不是这个pthreads dll。



这是一个错误还是我做错了?



我的系统设置的小信息
窗口7 64位,与Apache 2.4.x VC14



PHP信息




  • 系统Windows NT NG10676 6.1 build 7601


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


  • 构建日期2016年6月21日15:08:19


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


  • 架构x64


  • 线程安全启用




请注意,我的系统上安装了所有VC编译器10,11,14全部64位并安装了32位,以防万一。



请注意,我已经尝试过关于pthreads安装的所有以前的线程,并且它们对我的安装没有帮助。
我已经尝试过每一个谷歌页面,但他们只是不工作,任何帮助将不胜感激。如果PHP pthreads设计人员可以在这个版本上说明一下。

解决方案

README中的报价


pthreads v3仅限于在CLI中操作:我花了很多年试图解释网络服务器中的线程只是没有意义,在1,111提交pthread之后,我已经意识到,我的建议是不会被忽视的。



所以我正在推广建议难点和快速的事实:你不能使用pthreads安全和敏感的任何地方,但CLI。



感谢您的听力;)


< blockquote>

报价从博客解释从v2的变化


...



EJB的明确禁止程序员通过规范创建线程,而现代Java甚至不具有1:1模型。显然,这主要是因为环境可能会被迁移(在服务器集群内移动),移动线程之外的管理池是难以想象的。它比禁止创建线程更进一步,它禁止使用同步原语,因为如果在保留锁定的同时移动节点 - 如果保持锁定 - 所有的地狱都会松动。



在Java中,一般来说,不鼓励手动创建Servlet中的线程,原因同样如此,我不建议使用pthread。



尽管不是每个环境都是真的实际上会禁止它,它的运行尽可能深;每个人都同意在网络应用环境中创建真实(1:1)线程是一个坏主意。



...



I am trying to install latest pthreads extension 3.1.6 64bit for PHP.

As per the author advice of pthreads, on http://github.com/krakjoe/pthreads

I have placed the two dlls to the desired locations.

Add pthreadVC2.dll (included with the Windows releases) to the same directory as php.exe eg. C:\Apache24\php Add php_pthreads.dll to PHP extention folder eg. C:\Apache\php\ext

And also in Windows\system32 directory

And also added LoadFile in [Apache Http.confd][1]

And I have added added extension to my php.ini

php.ini

But Apache won't start and when I check the apache error.log, I have the below

[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

[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?

I have moved php_pthreads.dll extension to top of the extension list and to the bottom but no joy. It just won't start with this pthreads dll. But if I comment back ;extension=php_pthreads.dll , my Apache will restart but just not with this 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

PHP info

  • System Windows NT NG10676 6.1 build 7601

  • (Windows 7 Enterprise Edition Service Pack 1) AMD64

  • Build Date Jun 21 2016 15:08:19

  • Compiler MSVC14 (Visual C++ 2015)

  • Architecture 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.

Please note, I have tried all previous threads about pthreads installation and they don't help with my installation. I have tried every google page but they just don't work, any help would be appreciated. If PHP pthreads designer can shed some light on this version.

解决方案

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.

So I'm promoting the advice to hard and fast fact: you can't use pthreads safely and sensibly anywhere but CLI.

Thanks for listening ;)

Quote from blog explaining change from v2

...

EJB's expressly prohibit the programmer from creating threads by specification, and modern Java doesn't even have a 1:1 model. 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.

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.

...

这篇关于PHP Pthreads最新版本3.1.6(64位)不安装在Apache上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆