【问题标题】:Phalcon: Unable to initialize module Module compiled with build windows 7 x64 Zend ServerPhalcon:无法初始化使用构建 Windows 7 x64 Zend Server 编译的模块模块
【发布时间】:2014-09-30 13:52:04
【问题描述】:

我正在尝试在运行 Zend Server 的 Windows 7 上安装 Phalcon 模块。

一些有用的信息:php -v

 [30.09.2014 15:02:32 p12888/t2672 NOTICE] Successfully established connection the database
 PHP 5.5.13 (cli) (built: Jun 26 2014 12:03:16)
 Copyright (c) 1997-2014 The PHP Group
 Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
  with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
  with Zend Extension Manager v6.0.0, Copyright (c) 2003-2014, by Zend Technogies
  with Zend Data Cache v6.0.0, Copyright (c) 2004-2014, by Zend Technologies
  [loaded] [licensed] [disabled]
- with Zend Job Queue v6.0.0, Copyright (c) 2004-2014, by Zend Technologies
[loaded] [not licensed] [disabled]
- with Zend Session Clustering v6.0.0, Copyright (c) 2004-2014, by Zend Tecnologies [loaded][licensed] [disabled]
- with Zend Utils v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [licensed] [licensed] [enabled]
- with Zend Code Tracing v6.0.0, Copyright (c) 2009-2014, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Server Z-Ray v7.0.0, Copyright (c) 1999-2014, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Monitor v6.0.0, Copyright (c) 1999-2014, by Zend Technologies [loaded] [licensed] [disabled]
- with Zend Debugger v6.0.0, Copyright (c) 1999-2014, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Page Cache v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [licensed] [disabled]
- with Zend Monitor UI v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [licensed] [enabled]

操作系统:Windows 7 X64

我正在从 http://phalconphp.com/en/download/windowshttps://github.com/phalcon/cphalcon/tree/master 下载 DLL

Zend 服务器安装在 x86 程序文件中,我尝试安装 dll,从日志中得到的是:

[30-Sep-2014 15:35:42] PHP Warning:  PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20121212,NTS,VC11
PHP    compiled with build ID=API20121212,NTS,VC9
These options need to match
 in Unknown on line 0
[30-Sep-2014 15:35:44] PHP Warning:  PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20121212,NTS,VC11
PHP    compiled with build ID=API20121212,NTS,VC9
These options need to match
 in Unknown on line 0
[30-Sep-2014 15:35:46] PHP Warning:  PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20121212,NTS,VC11
PHP    compiled with build ID=API20121212,NTS,VC9
These options need to match in Unknown on line 0
[30-Sep-2014 15:37:08] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Zend\ZendServer\lib\phpext\php_phalcon.dll' - The specified module could not be found.
 in Unknown on line 0
[30-Sep-2014 15:37:10] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Zend\ZendServer\lib\phpext\php_phalcon.dll' - The specified module could not be found.
 in Unknown on line 0
  [30-Sep-2014 15:38:28] PHP Warning:  PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20121212,NTS,VC11
PHP    compiled with build ID=API20121212,NTS,VC9
 These options need to match in Unknown on line 0
 [30-Sep-2014 15:38:30] PHP Warning:  PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20121212,NTS,VC11
PHP    compiled with build ID=API20121212,NTS,VC9
These options need to match
 in Unknown on line 0
 [30-Sep-2014 15:38:32] PHP Warning:  PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20121212,NTS,VC11
PHP    compiled with build ID=API20121212,NTS,VC9
These options need to match
 in Unknown on line 0

对于我尝试作为 PHP 模块安装的不同 DLL,我得到了这些错误。你有什么线索可以在 Windows 上安装它吗?

我已经安装了一些模块,例如 MONGO,它可以工作,但我正在努力使用 phalcon

【问题讨论】:

    标签: php phalcon php-extension zend-server php-5.5


    【解决方案1】:

    当您为 Windows 使用预编译的 PHP 扩展时,您必须匹配 API 编号(PHP 版本)、开启或关闭线程安全(ZTS 或 NTS)以及用于编译的 Visual Studio 版本

    使用 build ID=API20121212,NTS,VC9 编译的 PHP

    此信息告诉您,您使用的 Zend 服务器版本的 PHP 是用 VC9 编译的,已关闭线程安全 (NTS),并且需要 PHP 内部 API 的 20121212 版本

    使用 build ID=API20121212,NTS,VC11 编译的模块

    此信息告诉您,您下载的 phalcon 扩展是使用 VC11 编译的 - 但 API 和线程安全设置与当前的 PHP 安装相同。但是,由于三件事之一不匹配,扩展程序将无法正确加载。

    不幸的是 phalcon 不提供 PHP 5.5、NTS 的扩展的预编译版本,使用 VC9 构建,因此您需要自己构建或要求维护者添加该版本

    或者为你的 PHP 使用 Zend Server 以外的东西

    【讨论】:

    • 感谢 elizabeth 的回答,我已经想通了,在我的 php、zend 和 windows 版本上安装它非常麻烦。
    猜你喜欢
    • 2014-11-13
    • 2012-07-01
    • 2012-12-26
    • 2017-06-04
    • 2013-09-03
    • 1970-01-01
    • 2018-08-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多