I recently tried to install a PHP PECL extension on a server I manage, when I received this error:

[root@xxxx PDO-1.0.3]# pecl install pdo
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
/usr/local/bin/phpize: /tmp/pear/temp/PDO/build/shtool: /bin/sh: bad interpreter: Permission denied
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

ERROR: `phpize' failed
[root@xxxx PDO-1.0.3]#

After some searching, I figured out this is because I had set /tmp to noexec to keep any intruders from executing files from this directory. I suspect the same error will occur with any PECL extension installation. I temporarily turned it off with the command:

mount -oremount,exec /tmp

Now PECL installs extensions fine. Don’t forget to reenable noexec when you are done!

3 comments
  1. Pingback: Dave Drager
  2. Hi David, couldn’t get this to work but thanks anyway. What distribution were you using? Marcus

  3. Hi David, couldn’t get this to work but thanks anyway. What distribution were you using? Marcus

Comments are closed.

You May Also Like

Ubuntu Server in Place Network Upgrade From 8.10 to 9.04

It is easy to do an in-place upgrade of Ubuntu Server from…

Accessing Microsoft ODBC data sources in Linux

Developing web apps cross platform can be a pain sometimes, as the…

A Twitter Search WordPress Plugin

Ok, this is not really a plugin per se, but WordPress already…

Installatron WordPress Upgrade Disables Plugins

I just found a quick tip on the Installatron forums. By default…