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?

2
  • 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 Commented Feb 1, 2011 at 7: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. Commented May 16, 2013 at 6:40

1 Answer 1

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.