lovesh
lovesh

Reputation: 5401

unable installing php extensions from source

I installed php 5.3.10 from source and it runs fine. But when i tried to install extensions from source packages like xdebug and mongo i get the following output after running phpize

PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions

Notice that these are just warnings not failure. So i continued and used ./configure and then make and then make install. A message came like this

Installing shared extensions:     /usr/local/lib/php/extensions/debug-zts-20090626/

I checked in the above directory and the extension's shared object(.so) was there. So i added the path to my php.ini and restarted apache. But the extension is not installed.

I googled it and found that the warnings come because the phpize path is not correct. I checked this by phpize --help and it shows the path /usr/local/bin/phpize

also php-config version is 5.3.10 php-config -v and it shows version 5.3.10

Whats wrong and what is meant by those warnings?

EDIT: When i try to install these extension from pecl i can install them successfully and i can see them installed in the output of phpinfo()

But i cant install mcrypt via pecl so i need some way of installing extensions using phpize

Upvotes: 0

Views: 4449

Answers (1)

Gadonski
Gadonski

Reputation: 3330

i know it's a old question, but to solve this problem, just run the command ./configure with the option "--with-php-config".

./configure --with-php-config=/usr/bin/php-config

Upvotes: 3

Related Questions