linux系统下php扩展库的安装,以CURL为例
1,进入php的源码目录,一定会有。
2. cd ext/curl
3. php_install_path/bin/phpize
4. ./php_install_path/bin/configure –-with-curl=DIR
//如果有错如configure: error: Cannot find php-config. Please use --with-php-config=PATH,
//则运行 ./php_install_path/bin/configure --with-php-config=/php-install-path/bin/php-config
//注意,php_install_path是你php安装的目录,不是源码目录哦,比如我的安装目录是/mnt/server/php,
5. make
6.刚才在moudles下生成了curl.so的文件,复制curl.so文件到php配置文件php.ini中extension_dir所指向的目录,比如我的extension_dir是/mnt/server/php/lib/php/extensions/no-debug-non-zts-20090626
7.在php.ini中添加"extension=curl.so"——添加的时候没有引号啊。
8.the last but not the least,重启apache
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~