The phpize command is used to prepare the build environment for a PHP extension. Sources of extension are inside the extension directory -->"ext" (/home/cpeasyapache/src/php-x.x.x/ext/)directory.
$ cd extname
$ phpize
$ ./configure
$ make
# make install
Once this is complete "extension.so" is created and put in php extension directory. You need to add the extension inside "php.ini" file.
If you have multiple PHP versions installed, you may be able to specify for which installation you'd like to build by using the --with-php-config option during configuration.
--with-php-config=[Insert path to proper php-config here]
For example (my case):
./configure --with-php-config=/usr/local/php5/bin/php-config5
Steps to enable extension,
1) cd /home/cpeasyapache/src/php-x.x.x/ext/
where php-x.x.x is the PHP version for which the module needs to be installed.
2) Select the extension to be enabled and enter the directory. For example mysqli
cd mysqli
3) Create a build environment for the PHP extension using phpize command :
phpize
4) Run configure script to create a Makefile
./configure
5) Compile and run the excutables using make
make
6) When we run make all the executables will be created in a temporary directory , where you have unzipped the original tarball.So to copy the extensions to the final directory make install must be run :
make install
Done
The refernce URL is,
http://stackoverflow.com/questions/6200994/how-to-enable-php-extension-using-phpize
$ cd extname
$ phpize
$ ./configure
$ make
# make install
Once this is complete "extension.so" is created and put in php extension directory. You need to add the extension inside "php.ini" file.
If you have multiple PHP versions installed, you may be able to specify for which installation you'd like to build by using the --with-php-config option during configuration.
--with-php-config=[Insert path to proper php-config here]
For example (my case):
./configure --with-php-config=/usr/local/php5/bin/php-config5
Steps to enable extension,
1) cd /home/cpeasyapache/src/php-x.x.x/ext/
where php-x.x.x is the PHP version for which the module needs to be installed.
2) Select the extension to be enabled and enter the directory. For example mysqli
cd mysqli
3) Create a build environment for the PHP extension using phpize command :
phpize
4) Run configure script to create a Makefile
./configure
5) Compile and run the excutables using make
make
6) When we run make all the executables will be created in a temporary directory , where you have unzipped the original tarball.So to copy the extensions to the final directory make install must be run :
make install
Done
The refernce URL is,
http://stackoverflow.com/questions/6200994/how-to-enable-php-extension-using-phpize