1

Can anyone give me any pointers on why the following ./configure settings do not appear to actually affect my build of PHP?

Details:

  • php-5.3.5
  • Compiling in order to use php-cgi on a per-domain basis

For example, my ./configure looks like this:

./configure --with-curl --enable-mbstring

The make, make install works fine, and I successfully get my php-cgi binary. When I run:

<?php phpinfo() ?>

I can see that I am running 5.3.5, but there is no sign of curl or mbstring.

However, there is a catch: If I use run phpize on the extension directly (in the source) and go through a proper ./configure, make, make install, I can add:

extension=mbstring.so

to my php.ini and then I see mbstring in my phpinfo() output.

What I surmise from this is that I can put in the extra effort to manually compile each and every extension I want, but I cannot get the extensions to compile in directly.

Any thoughts?

Tanner Perrien
  • 3,133
  • 1
  • 28
  • 35
  • first dummy rule : **did you restart your apache?** if you are testing via a web page. Secondly, try `PATH/php -m`, and `PATH/php -i grep config`, both are tally? lastly, make sure you are access the correct php binaries – ajreal Feb 01 '11 at 07:25
  • I got the same problem. I build some extension with source code under ext folder, some extension is successfully loaded by php, but only **curl** and **mbstring** can not be loaded. Anybody knows why? Thanks. – brucenan May 16 '13 at 06:40

1 Answers1

1

ajreal's comment pointed me in the right direction.

I was trying a few things all at the same time and ended up crossing a few wires. I was not successful at creating a symbolic link to the php-cgi binary, so it had been copied to:

/var/www/vhost/DOMAIN/bin.

It was still pointing to the correct php.ini, but was not the same binary as what I had later compiled with the additional extensions.

Now it makes sense why modules added in the php.ini showed up but were not directly compiled in. Lesson learned!

Tanner Perrien
  • 3,133
  • 1
  • 28
  • 35