无法让Zorba使用PHP和Nginx在Windows 7上运行(Can't get Zorba working on Windows 7 with PHP and Nginx)
我试图在这些说明的帮助下在Windows 7机器上安装Zorba。 我已经完成了“验证Zorba”部分,但我无法完成“在PHP中启用Zorba扩展”部分。 当我尝试重启PHP时,弹出一个Windows对话框说;
我需要从源代码编译吗? 说明说从源代码编译Zorba,而是从Zorba下载页面下载了Windows安装包。 我还必须从源代码编译吗? 当然不是吗?
缺少zorba_api_wrapper.php说明说“找到文件zorba_api_wrapper.php”,但我找不到该名称的文件。 有一个名为zorba_api.php的文件,所以我用它来代替。 这是正确的文件吗?
php-cgi.exe我正在运行PHP的CGI版本。 我从命令提示符开始做;
php-cgi -b 127.0.0.1:9000
这可能是导致错误对话的原因吗? 我想让Apache启动PHP更常见。 (我使用的是Nginx而不是Apache。)
更新
正如Rodolfo所建议的那样,我已将
C:\Program Files\Zorba XQuery Processor 2.0.2\bin
到PATH
环境变量中并卸载了旧版本的Zorba。 现在,当我尝试通过执行来启动PHP时;php-cgi -b 127.0.0.1:9000
我得到一个不同的Windows对话框;
问题详细信息中的信息是;
Problem signature: Problem Event Name: APPCRASH Application Name: php-cgi.exe Application Version: 5.3.2.0 Application Timestamp: 4b8ec866 Fault Module Name: php5ts.dll Fault Module Version: 5.3.2.0 Fault Module Timestamp: 4b8ec7e7 Exception Code: c0000005 Exception Offset: 000f56c0 OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 2057 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
如果我从
php.ini
删除行extension=zorba_api.dll
,PHP启动正常。I'm trying to install Zorba on a Windows 7 machine with the help of these instructions. I've completed the "Verify Zorba" section ok, but I can't complete the section "Enable Zorba extension in PHP". When I attempt to restart PHP, a Windows dialog box pops up saying;
Do I need to compile from source? The instructions say to compile Zorba from source but instead have downloaded the Windows installation package from the Zorba download page. Do I also have to compile from source? Surely not?
Missing zorba_api_wrapper.php The instructions say "locate the file zorba_api_wrapper.php" but I can't find a file of that name. There is a file called zorba_api.php so I've used that instead. Is that the correct file?
php-cgi.exe I'm running the CGI version of PHP. I start it from the command prompt by doing;
php-cgi -b 127.0.0.1:9000
Could that be what's causing the error dialog? I guess it's more common to have Apache start PHP. (I'm using Nginx not Apache.)
Update
As suggested by Rodolfo, I've added
C:\Program Files\Zorba XQuery Processor 2.0.2\bin
to thePATH
environment variable and uninstalled an older version of Zorba. Now when I try to start PHP by doing;php-cgi -b 127.0.0.1:9000
I get a different Windows dialog;
The info in the Problem Details is;
Problem signature: Problem Event Name: APPCRASH Application Name: php-cgi.exe Application Version: 5.3.2.0 Application Timestamp: 4b8ec866 Fault Module Name: php5ts.dll Fault Module Version: 5.3.2.0 Fault Module Timestamp: 4b8ec7e7 Exception Code: c0000005 Exception Offset: 000f56c0 OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 2057 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
If I remove the line
extension=zorba_api.dll
fromphp.ini
, PHP starts ok.
原文:https://stackoverflow.com/questions/7650585
满意答案
那么,考虑到你的用例看起来是什么,你就会错误地解决它。 你真的应该做更多的事情
version(A) { immutable int var = 1; } else version(B) { immutable int var = 2; } else { immutable int var = 3; }
但在一般情况下,如果您正在专门测试符号是否存在,请使用
is(typeof(symbol))
,其中symbol
是要测试的符号的名称。 所以,如果你想测试变量var
是否存在,你会做类似的事情static if(is(typeof(var))) { //var exists }
当然要测试它不存在,你只是否定了这个条件:
static if(!is(typeof(var))) { //var does not exist }
typeof(exp)
获取表达式的类型,如果表达式无效(由于变量不存在或者表达式中的函数不适用于这些参数或其他),则结果为void
。is(type)
检查类型是否void
。 因此,is(typeof(exp))
测试exp是否是一个有效的表达式,并且在它只是一个符号名称的情况下,这意味着它正在测试它是否是有效的符号。Well, given what your use case appears to be, you're going about it incorrectly. You really should do something more like
version(A) { immutable int var = 1; } else version(B) { immutable int var = 2; } else { immutable int var = 3; }
But in the general case, if you're looking specifically to test whether a symbol exists, use
is(typeof(symbol))
wheresymbol
is the name of the symbol that you're testing for. So, if you wanted to test whether the variablevar
existed, you would do something likestatic if(is(typeof(var))) { //var exists }
and of course to test that it doesn't exist, you just negate the condition:
static if(!is(typeof(var))) { //var does not exist }
typeof(exp)
gets the type of an expression, and if the expression is invalid (because of a variable which doesn't exist or a function in the expression doesn't work with those arguments or whatever), then the result isvoid
.is(type)
checks whether the type is non-void
. So,is(typeof(exp))
tests whether exp is a valid expression, and in the case where it's just a symbol name, that means that it's testing whether it's a valid symbol or not.
相关问答
更多未声明绑定变量“D”(Bind variable “D” not declared)
检查JavaScript变量是否曾经被声明过?(Check whether JavaScript variable has once been declared? [duplicate])
XSLT:检查变量是否退出,是否已声明(XSLT: Check if variable exits, was declared)
检查d中函数(d){...}中的d是否有变量(Check if d has variable in function (d) {…} in D3)
如何检查变量是否在D中声明?(How to check whether a variable is declared in D?)
如何检查变量是否在Python中声明?(How do I check whether a variable is declared in Python?)
相关文章
更多nginx基本运行命令
PHP简介
nginx开机启动
Nginx配置文件详解
nginx的平滑重启
利用CoLinux在Windows中运行Linux系统
Working on Free Software
php solr 扩展
nginx下载与安装
《微软Windows 8新特性和功能教程》(VTC.com Microsoft Windows 8 Introduction Course)[光盘镜像]
最新问答
更多python的访问器方法有哪些
使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
透明度错误IE11(Transparency bug IE11)
linux的基本操作命令。。。
响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
元素上的盒子阴影行为(box-shadow behaviour on elements)
它看起来像只在Windows上的Chrome的错误。 我在Google Canary (Chrome 63)中也进行了测试,问题依然存在,所以有可能它不会很快修复。 这个问题是由overflow: auto引起的overflow: auto ,在你的情况下,它可以很容易地通过删除或设置为可见(默认)来解决。 但是 ,将鼠标悬停在右侧(顶部和底部)时,会出现滚动条。 一个解决方案可以设置overflow: hidden的身体,所以预期的结果是所需的。 我想指出,这不是一个很好的解决方案,但我建议暂
Laravel检查是否存在记录(Laravel Checking If a Record Exists)
这取决于您是否要以后与用户合作,或仅检查是否存在。 如果要使用用户对象(如果存在): $user = User::where('email', '=', Input::get('email'))->first(); if ($user === null) { // user doesn't exist } 如果你只想检查 if (User::where('email', '=', Input::get('email'))->count() > 0) { // user found
设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
$scope.getData= function () { var reader = new FileReader(); reader.onload = $('input[type=file]')[0].files; var img = new Image(); img.src =(reader.onload[0].result); img.onload = function() { if(this.width > 640
Copyright ©2023
peixunduo.com All
Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!
Laravel检查是否存在记录(Laravel Checking If a Record Exists)
设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!