yum -y install openssl
/usr/local/bin/是php的安装目录
切换到php安装目录的etx/openssl目录
cd /root/soft/php-5.2.8/ext/openssl
/usr/local/bin/phpize
Cannot find config.m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module
查看openssl目录下有个config.w32和config0.m4,把config0.m4改名为config.m4。
mv config0.m4 config.m4
执行:
/usr/local/bin/phpize
编译:
./configure --with-openssl --with-php-config=/usr/local/bin/php-config make;make install
提示成功后,在php.ini里加入extension = openssl.so
重启apache或php-fpm,完成.
PS:为啥目录下是config0.m4,而不是config.m4,不理解。
pcre、zlib等模块目录下也是config0.m4。
更多不重新编译PHP为php增加openssl模块的方法相关文章请关注PHP中文网!
立即学习“PHP免费学习笔记(深入)”;
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号