Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

There are no errors when compiling from source (or installing via pecl), but after it's installed, PHP says this:

/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). 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. 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).

I suspect this might have something to do with PHP being pinned, because I can't find any documentation about this behavior.

like image 614
Brian Avatar asked Dec 21 '11 20:12

Brian


1 Answers

...somebody shoot me now. It's not a valid Zend extension because it's not a zend extension!

All I needed to do was put this in php.ini:

extension = gearman.so

instead of this:

zend_extension = gearman.so

like image 126
Brian Avatar answered Oct 01 '22 06:10

Brian