简体   繁体   English

编译的PHP扩展无效

[英]Compiled PHP extension is not valid

I am trying to install the gearman PHP extension on Ubuntu 10.04 with PHP pinned to 5.2, but PHP is telling me it's not a valid Zend extension. 我试图在Ubuntu 10.04上安装gearman PHP扩展,PHP固定为5.2,但PHP告诉我它不是一个有效的Zend扩展。

There are no errors when compiling from source (or installing via pecl), but after it's installed, PHP says this: 从源代码编译时(或通过pecl安装)没有错误,但在安装完成后,PHP会这样说:

/usr/lib/php5/20060613+lfs/gearman.so doesn't appear to be a valid Zend extension

The architecture of the module matches the arch of PHP (I've tried it on both 32-bit and 64-bit systems). 模块的体系结构与PHP的结构相匹配(我在32位和64位系统上都尝试过它)。 I have installed all of the dependencies as far as I'm aware (I assume I would get errors if I missed any - and I did at first). 据我所知,我已经安装了所有依赖项(我假设如果我错过了任何错误,我会得到错误 - 我起初做了)。

I am using gearman 0.8.0 because it is the highest version that runs on PHP 5.2. 我正在使用gearman 0.8.0,因为它是在PHP 5.2上运行的最高版本。 And I'm using PHP 5.2 because the last time I checked, our drupal 6 did not play well with 5.3 (supposedly this has been fixed in core, but not necessarily for modules). 我使用的是PHP 5.2,因为我最后一次检查时,我们的drupal 6与5.3不一致(据说这已经在核心中修复,但不一定是模块)。

I suspect this might have something to do with PHP being pinned, because I can't find any documentation about this behavior. 我怀疑这可能与固定PHP有关,因为我找不到有关此行为的任何文档。

...somebody shoot me now. ......现在有人开枪了。 It's not a valid Zend extension because it's not a zend extension ! 它不是有效的Zend扩展,因为它不是zend扩展

All I needed to do was put this in php.ini: 我需要做的就是把它放在php.ini中:

extension = gearman.so

instead of this: 而不是这个:

zend_extension = gearman.so

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

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