PHP动态编译openssl

PHP动态编译openssl

cd /root/src/php-5.2.6/ext/openssl/
cp config0.m4 config.m4
/app/php/bin/phpize
./configure –with-openssl=/app/lib –with-php-config=/app/php/bin/php-config
make && make install

注意多了一个复制文件的步骤,在其他的so编译的时候是不需要的。

不清楚为啥动态编译不启作用,重新编译了下

下载openssl
make
make install

重新编译php

‘./configure’ ‘–prefix=/usr/local/php’ ‘–with-apxs2=/usr/local/apache2/bin/apxs’ ‘–with-mysql’ ‘–enable-ftp’ ‘–enable-mbstring’ ‘–enable-libxml’ ‘–enable-zip’ ‘–with-gd=/usr/local/gd’ ‘–with-curl’ ‘–with-gettext’ ‘–with-pdo-mysql’ ‘–enable-sockets’  –with-openssl=/usr/local/ssl
make
make install

configure: error: Please reinstall the libcurl distribution

apt-get install libcurl4-openssl-dev
apt-get install libssl-dev
Comments are closed.