I had php 5.3 installed and upgrade to 5.4 using this PPA https://launchpad.net/~ondrej/+archive/php5 - everything went smoothly.

My old pecl extensions, such as oauth, wern't enabled, so I uninstalled and reinstalled them. But they aren't getting loaded. Pecl is building the package fine, but installing the 'so' file to the wrong location - '/usr/lib/php5/20090626' instead of the new '/usr/lib/php5/20100525' even though the ext_dir is correctly set, appears to be a bug - https://bugs.php.net/bug.php?id=55196

I moved oauth.so to the new extension dir (from the php.ini file) and double checked extension=oauth.so in my php.ini - but it still won't load the extension.

When running

pecl install oauth

I notice :

Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

Is pecl compiling for the older version of php? Is this why the extension aren't being loaded?

1 Answer 1


I looked in my apache log and found the following error

OAuth: Unable to initialize module Module compiled with module API=20090626 PHP    compiled with module API=20100525 These options need to match in Unknown on line 0

So it was indeed getting compiled with the wrong target version.

All I had to do was

sudo apt-get install php5-dev

Then rerun the install.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .