当前位置:网站首页>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
边栏推荐
- Fund managers' corporate governance and risk management
- 智慧路灯| 云计算点亮智慧城市的“星星之火”
- How to distinguish between platform security and online hype? What are the stop loss techniques for online speculation?
- Reason why wechat payment wxpaypubhelper V3 callback XML is empty
- Redis的事务和锁机制
- Doker的容器数据卷
- 高等数学建模
- Esp8266 becomes client and server
- Warmup preheating learning rate "suggestions collection"
- 唯一性索引与逻辑删除冲突问题解决思路
猜你喜欢
![Cesiumjs 2022 ^ source code interpretation [6] - new architecture of modelempirical](/img/ce/519778cd731f814ad111d1e37abd10.png)
Cesiumjs 2022 ^ source code interpretation [6] - new architecture of modelempirical

HP 惠普笔记本电脑 禁用触摸板 在插入鼠标后

In depth analysis of Apache bookkeeper series: Part 4 - back pressure

Deployment of microservices based on kubernetes platform

Two dots on the top of the latex letter

Swift 5.0 - creation and use of swift framework

在线客服聊天系统源码_美观强大golang内核开发_二进制运行傻瓜式安装_附搭建教程...
![[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview](/img/1d/62e55f1b5445d7349ec383879f4275.png)
[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview

MIT doctoral dissertation optimization theory and machine learning practice

Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction
随机推荐
New trends of China's national tide development in 2022
8253A寄存器浅析
云游戏| 云计算推动游戏行业进入“新纪元”
C /platform:anycpu32bitpererrored can only be used with /t:exe, /t:winexe and /t:appcontainerexe
Fund clients and sales agencies
Redis的事务和锁机制
CNN classic network model details -lenet-5 (pytorch Implementation)
C language array interception, C string by array interception method (c/s)
CTFSHOW框架复现篇
理想中的接口自动化项目
lvm-snapshot:基于LVM快照的备份之准备工作
Smart streetlights | cloud computing lights up the "spark" of smart cities
As the public cloud market enters the deep water, can the calm Amazon cloud still sit still?
ESP8266 成为客户端和服务器
[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview
Cloud games | cloud computing drives the game industry into a "new era"
基金客户和销售机构
Shell multitasking to download video at the same time
1175. 质数排列 / 剑指 Offer II 104. 排列的数目
[golang] golang implements the string interception function substr