开发者

Compiling PHP with extensions

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?


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜