Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install a PHP module, which requires phpize and I'm being met with a warning, even though it exists and is installed.

Cannot find config.m4.Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

So, I've tried running phpize from both root, with /usr/bin/phpize and just # phpize, still met with the same warning.

My PHP modules are stored in usr/lib64/php/modules/ so I've tried running phpize from there, still the same warning.

php-devel is installed:

Package php-devel-5.3.3-14.el6_3.x86_64 already installed and latest version
Nothing to do

which phpize yields this - /usr/bin/phpize

find -name 'config.m4' yields this - find: File system loop detected; ./var/named/chroot/var/named' is part of the same file system loop as ./var/named'.

So, I'm assuming config.m4 either isn't in the same directory phpize is running from, or that loop error I'm getting is causing it to be hidden/not found, etc.

Any insight would be greatly appreciated, SF.

Edit: I'm trying to build

share|improve this question
What extension are you trying to build? – Ben Lessani - Sonassi Oct 2 '12 at 18:52 – RCNeil Oct 2 '12 at 18:55
Okay, I've edited my answer to give you the exact commands to run and in what order. – Ben Lessani - Sonassi Oct 2 '12 at 18:58
up vote 1 down vote accepted

config.m4 should be in the current working directory of the extension you are trying to build.

So when you've downloaded the source PECL package, you would do it something like this

cd /usr/src
wget -O mypackage.tgz
tar xvfz mypackage.tgz
cd saprfc*
make install

If you try and run phpize in another directory that isn't the source directory of a PHP extension; then of course it will complain that config.m4 is missing.

share|improve this answer
Spot on. I guess what I don't get is that when I cd /usr/lib64/php/modules/saprfc/, aren't I in the correct source directory of a PHP extension at that point? – RCNeil Oct 2 '12 at 19:02
Only if you downloaded the source to that location, otherwise, no. – Ben Lessani - Sonassi Oct 2 '12 at 19:03
Hm, I thought I did. I had it placed in /usr/lib64/php/modules/saprfc/ and tried phpize from in there, but was met with that error. Not sure why, total noob here, but thank you for the directions! They were perfect... except that the install failed because it's dependent on another package. Fixed my problem though! Thanks! – RCNeil Oct 2 '12 at 19:10

Make sure that config.m4 is in the directory that contains the PHP module you are building. If not, then something is missing when you extracted it.

In regards to "file system loop detected" with your find command. Try using locate instead. For me it's a lot easier when doing simple file searches. Just make sure you do a updatedb first to update it's database.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.