安装php扩展

时间:2021-04-26 23:17:18

下面我以soap安装为例子

cd /home/zhangy/php-5.2.6/ext/soap

/usr/local/php/bin/phpize
#确定php-config文件在不在,调用php-config,安装后.so文件会自动放到extension_dir里面
./configure --enable-soap --with-php-config=/usr/local/php/bin/php-config
make && make install
安装完后会有这样的东西
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
三,查看.so文件,以及修改php.ini
cd /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
ls -al |grep soap
-rwxr-xr-x 1 root root 763334 Feb 9 10:51 soap.so
vi /usr/local/php/lib/php.ini
在加载模块的地加上一行extension=soap.so
四,重起apache或者phpcgi或者其他