当前位置:网站首页>CentOS 6.3 x64 PHP 5.2.6 扩展安装OpenSSL出错的解决方法
CentOS 6.3 x64 PHP 5.2.6 扩展安装OpenSSL出错的解决方法
2022-06-30 23:21:00 【星哥玩云】
以前编译php没有 –with–openssl 现在要使用到 openssl ,phpinze扩展安装,但是在make时候报错
今天找这个在网上找了大半天,最后总结应该是php版本本身的问题,错误是php编译好后,通过phpize单独添加时候报错的内容
问题: /usr/local/src/php-5.2.6/ext/openssl/openssl.c:229: error: expected specifier-qualifier-list before ‘LHASH’ /usr/local/src/php-5.2.6/ext/openssl/openssl.c:410: error: expected declaration specifiers or ‘…’ before ‘LHASH’ /usr/local/src/php-5.2.6/ext/openssl/openssl.c: In function ‘php_openssl_config_check_syntax’: /usr/local/src/php-5.2.6/ext/openssl/openssl.c:416: error: ‘config’ undeclared (first use in this function) /usr/local/src/php-5.2.6/ext/openssl/openssl.c:416: error: (Each undeclared identifier is reported only once /usr/local/src/php-5.2.6/ext/openssl/openssl.c:416: error: for each function it appears in.) /usr/local/src/php-5.2.6/ext/openssl/openssl.c: In function ‘add_oid_section’: /usr/local/src/php-5.2.6/ext/openssl/openssl.c:435: error: ’struct php_x509_request’ has no member named ‘req_config’ /usr/local/src/php-5.2.6/ext/openssl/openssl.c:439: error: ’struct php_x509_request’ has no member named ‘req_config’
解决思路
php5.2.5 php5.2.6 php5.2.8 php5.3.0
php安装好后在独立安装openssl扩展会有问题,推荐使用php5.2.17 wget http://museum.php.net/php5/php-5.2.17.tar.gz
这个是经过测试的出来的结果
安装过程: #下面是php的安装目录 /usr/local/php5/bin/
#切换到php安装目录的 etx/openssl目录 cd /php-5.2.17/ext/openssl
#查看openssl目录下有个config0.m4,把config0.m4改名为config.m4。 cp config0.m4 config.m4
#依次执行: /usr/local/php5/bin/phpize
./configure –with-openssl –with-php-config=/usr/local/php5/bin/php-config
make && make install
#然后找到php.ini所在位置 打开 extension_dir(如果没有则自行添加), 同时添加 extension = “openssl.so”
#重启服务器 即可
#openssl 查看方法: /usr/local/php5/bin/php -m |grep openssl
边栏推荐
- Smart streetlights | cloud computing lights up the "spark" of smart cities
- Schéma de transition asynchrone - générateur
- Ideal interface automation project
- 深入理解 Jetpack Compose 内核:SlotTable 系统
- Ctfshow framework reproduction
- How to open a stock account? Is it safe to open a mobile account
- 基金銷售行為規範及信息管理
- 基金管理人公司治理和风险管理
- 在线客服系统代码_h5客服_对接公众号_支持APP_支持多语言
- 股票开户要如何办理呢?办理手机开户安全吗
猜你喜欢

MaxPool2d详解--在数组和图像中的应用

Online customer service system code_ H5 customer service_ Docking with official account_ Support app_ Support for multiple languages

76页智慧物流园区综合解决方案2022(附下载)

Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction

微信小程序中的数据双向绑定

Braces on the left of latex braces in latex multiline formula

Redis - 01 缓存:如何利用读缓存提高系统性能?

Doker的容器数据卷

Redis - 01 cache: how to use read cache to improve system performance?

Shell multitasking to download video at the same time
随机推荐
Redis的缓存穿透、缓存击穿和缓存雪崩
5G智慧建筑解决方案2021
深入理解 Jetpack Compose 内核:SlotTable 系统
基金客户和销售机构
As the public cloud market enters the deep water, can the calm Amazon cloud still sit still?
异步過渡方案—Generator
Wechat applet transmits parameters (data-) by clicking events
What does the &?
How to open a stock account? Is it safe to open a mobile account
Solution to the conflict between unique index and logical deletion
Solve arm_ release_ ver of this libmali is ‘g2p0-01eac0‘,rk_ so_ Ver is' 4 ', libgl1 mesa dev will not be installed, and there are unsatisfied dependencies
如何使用 DataAnt 监控 Apache APISIX
Fund clients and sales agencies
d编译时计数
Swift5.0 ----Swift FrameWork的创建及使用
未来十年世界数字化与机器智能展望
Two way data binding in wechat applet
Pycharm is very fast to learn from installation to full armament. There are so many pictures because it is too detailed!
composer
DNS server setup, forwarding, master-slave configuration