宝塔面板安装的php版本curl工作不正常解决方案

这篇博客详细介绍了如何在宝塔面板上修复PHP无法加载curl和openssl模块的错误。首先,确认当前安装的PHP版本,然后备份原有的配置文件。接着,重新配置PHP源码,特别指定了curl和openssl的路径,并进行编译和覆盖安装。通过这些步骤,可以成功解决PHP启动时加载动态库失败的问题。
摘要由CSDN通过智能技术生成

解决宝塔面板php无法加载curl或者openssl的模块的问题
PHP Warning: PHP Startup: Unable to load dynamic library ‘curl’
PHP Startup: Unable to load dynamic library ‘openssl’

v=73 # 指定宝塔现在已经安装了的php版本
php_src=/www/server/php/$v/src
php_build=/www/server/php/$v
cd $php_build&&cp etc etc_bak -R# 备份原本的配置文件
cd $php_src&&./configure  --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir--with-mhash --without-pear --with-gd --with-xmlrpc --enable-mysqlnd --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring --enable-pcntl --enable-sockets --enable-zip --enable-soap \
--with-php-config=$php_build/bin/php-config --with-curl=/usr/local/curl/ \
--with-openssl --with-php-config=$php_build/bin/php-config \
 --prefix=$php_build --with-config-file-path=$php_build/etc # 重新配置curl和openssl的php版本
make&&make install #编译并覆盖安装
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值