Linux lnmp curl环境 curl ssl verion怎么从nss改成openssl

linux中通过phpize添加PHP扩展openssl、mysql-linux-操作系统-壹聚教程网linux中通过phpize添加PHP扩展openssl、mysql
要说PHP扩展估计大家可以想到N多了,在此小编给各位介绍常用的展openssl、mysql扩展的安装与使用方法了,有兴趣了解在linux下安装扩展的朋友可一起和小编来看看。
phpizephpize 命令是用来准备 PHP 扩展库的编译环境的。下面例子中,扩展库的源程序位于 extname 目录中:$&cd&extname
$&./configure
#&make&install成功的安装将创建 extname.so 并放置于 PHP 的扩展库目录中。需要调整 php.ini,加入 extension=extname.so 这一行之后才能使用此扩展库。如果系统中没有 phpize 命令并且使用了预编译的包(例如 RPM),那要安装 PHP 包相应的开发版本,此版本通常包含了 phpize 命令以及相应的用于编译 PHP 及其扩展库的头文件。使用 phpize --help 命令可以显示此命令用法。原文:http://php.net/manual/zh/install.pecl.phpize.php添加openssl扩展#&cd&/data/pkg/php-5.5.15/ext/openssl
#&/usr/local/webserver/php/bin/phpize
Cannot&find&config.m4.&
Make&sure&that&you&run&'/usr/local/webserver/php/bin/phpize'&in&the&top&level&source&directory&of&the&module
#&mv&config0.m4&config.m4
#&./configure&--with-openssl&--with-php-config=/usr/local/webserver/php/bin/php-config
#&make&&&&make&install编译完成后将生成的openssl.so添加到php.ini中,并重启php-fpm#&vi&/usr/local/webserver/php/lib/php.ini
#&&aux&|&grep&php
root&&&&&1&&0.5&&2&?&&&&&&&&Ss&&&09:20&&&0:00&php-fpm:&master&process&(/usr/local/webserver/php/etc/php-fpm.conf)
nobody&&&1&&0.8&&2&?&&&&&&&&S&&&&09:20&&&0:00&php-fpm:&pool&www&&&&&&&&&&&&&&&&&&&&
nobody&&&1&&0.8&&2&?&&&&&&&&S&&&&09:20&&&0:00&php-fpm:&pool&www&&&&&&&&&&&&&&&&&&&&
root&&&&&2&&0.1&&&4028&&&676&pts/0&&&&R+&&&09:37&&&0:00&grep&php
#&kill&-USR2&19714重启完成后即可调用上篇rsa中的create方法生成公钥、私钥对。print_r(RsaUtil::create());添加mysql扩展#&cd&/data/pkg/php-5.5.15/ext/mysql
#&/usr/local/webserver/php/bin/phpize&
Configuring&for:
PHP&Api&Version:&&&&&&&&&
Zend&Module&Api&No:&&&&&&
Zend&Extension&Api&No:&&&
#&./configure&--with-php-config=/usr/local/webserver/php/bin/php-config&--with-mysql=/usr/local/webserver/mysql/
#&make&&&&make&install
Build&complete.
Don't&forget&to&run&'make&test'.
Installing&shared&extensions:&&&&&/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-/
#&vi&/usr/local/webserver/php/lib/php.inimysql.so会自动添加extension_dir所指目录中,修改php.ini添加 extension=mysql.so 重启php#&ps&aux&|&grep&php
root&&&&&&&&0.4&&2&?&&&&&&&&Ss&&&11:28&&&0:00&php-fpm:&master&process&(/usr/local/webserver/php/etc/php-fpm.conf)
nobody&&&&&&0.4&&2&?&&&&&&&&S&&&&11:28&&&0:00&php-fpm:&pool&www&&&&&&&&&&&&&&&&&&&&
nobody&&&&&&0.4&&2&?&&&&&&&&S&&&&11:28&&&0:00&php-fpm:&pool&www&&&&&&&&&&&&&&&&&&&&
root&&&&&&&&0.1&&&4028680 pts/0&&& R+&& 11:39&& 0:00 grep php# kill -USR2 1422查看PHPINFO是否已添加成功。
上一页: &&&&&下一页:相关内容linux - Compiling php with curl, where is curl installed? - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
I need to specify a directory when compiling php with --with-curl=
The curl binary is located at /usr/bin/curl
curl -V gives me
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
locate curl gives me
/usr/bin/curl
/usr/lib/libcurl.so.3
/usr/lib/libcurl.so.3.0.0
/usr/lib64/libcurl.so.3
/usr/lib64/libcurl.so.3.0.0
removed /usr/share/... and other irrelevant files
Tried --with-curl=/usr/lib64 and --with-curl=/usr/lib although I'm pretty sure it's 64 bit.
checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in &curl-dir&/include/curl/
PHP requires curl-devel
4,9972881147
None of these will allow you to compile PHP with cURL enabled.
In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl. They generally are bundled in a separate development package.
Per example, to install libcurl in Ubuntu:
sudo apt-get install libcurl4-gnutls-dev
Or CentOS:
sudo yum install curl-devel
Then you can just do:
./configure --with-curl # other options...
If you compile cURL manually, you can specify the path to the files without the lib or include suffix. (e.g.: /usr/local if cURL headers are in /usr/local/include/curl).
4,33944293
42.5k984122
Try just --with-curl, without specifying a location, and see if it'll find it by itself.
If you're going to compile a 64bit version(x86_64) of php use:
/usr/lib64/
For architectures (i386 ... i686) use /usr/lib/
I recommend compiling php to the same architecture as apache. As you're using a 64bit linux i asume your apache is also compiled for x86_64.
14.3k54048
php curl lib is just a wrapper of cUrl, so, first of all, you should install cUrl.
Download the cUrl source to your linux server. Then, use the follow commands to install:
tar zxvf cUrl_src_taz
cd cUrl_src_taz
./configure --prefix=/curl/install/home
(optional)
make install
/curl/install/home/bin/curl-config /usr/bin/curl-config
Then, copy the head files in the "/curl/install/home/include/" to "/usr/local/include".
After all above steps done, the php curl extension configuration could find the original curl, and you can use the standard php extension method to install php curl.
Hope it helps you, :)
protected by
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10
on this site (the ).
Would you like to answer one of these
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled求助军哥,lnmpa环境curl获取不到https页面,怎么解? - LNMP一键安装包 -
VPS侦探论坛 - 美国VPS|VPS测试、点评|VPS主机推荐|VPS主机架设优化|美国服务器|LNMP一键安装包|Linux|VPS优惠信息
求助军哥,lnmpa环境curl获取不到https页面,怎么解?
帖子7&积分5&威望0 &贡献3 &阅读权限10&
求助军哥,lnmpa环境curl获取不到https页面,怎么解?
我的主机是lnmpa环境,curl获取http网页是好的,但https结果是502,下面我贴出了openssl和curl的版本信息,帮我看看,谢谢。
openssl版本信息:代码:OpenSSL 1.0.1e-fips 11 Feb 2013
built on: Thu Nov&&6 12:33:36 UTC 2014
platform: linux-x86_64
options:&&bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wa,--noexecstack -DPURIFY -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: &/etc/pki/tls&
engines:&&dynamic curl版本信息:代码:curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
代购VPS、VPN、域名、主机找我哦 ...
帖子13170&积分36529&威望21728 &贡献38106 &阅读权限200&
Paypal信用卡代付/代购VPS/域名/软件/模板等 QQ: 旺旺:lzhenbao
淘宝网店:
QQ/旺旺仅提供代购及相关付费服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按 反馈信息!
UID3&帖子13170&精华&积分36529&威望21728 &贡献38106 &阅读权限200&来自山东济南&在线时间5697 小时&注册时间&最后登录&
帖子7&积分5&威望0 &贡献3 &阅读权限10&
引用:原帖由 licess 于
12:03 发表
http://bbs.vpser.net/thread-.html 军哥,我的curl普通网页是可以的,https网页才报502,也需要重编译php吗?
帖子7&积分5&威望0 &贡献3 &阅读权限10&
我直接把php升级了,问题ok
美国VPS推荐:
、、、、、、、、、、等。
美国VPS、VPN、域名代购:
Linux下Nginx+MySQL+PHP自动安装工具:
美国VPS、VPN、域名代购:curl - SSL CA cert (path? access rights?) - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
I am using CentOs 6.6 64bit, and have a problem when using curl. The server primarily hosts several wordpress blogs using apache and mysql.
My simplest means to generate the error is with the following yum command which outputs the below
yum list "ca-certi*"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: PYCURL ERROR 77 - "Problem with the SSL CA cert (path? access rights?)"
* base: cosmos.cites.illinois.edu
* extras: mirrors.rit.edu
* updates: mirrors.rit.edu
Installed Packages
ca-certificates.noarch
Soutions tried and failed so far based from googling around
1) I have tried restarting the VPS, no good
2) Executing curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt without any luck
3) This solution was no good at all, as it relies on yum to solve the SSL problem that yum also suffers
Can I run these yum steps to install with wget?, would you think it would help?
# yum reinstall ca-certificates
# yum reinstall openssl
I think virtualmin had installed some updates in the last 24 hours, is there a log of updates it ran somewhere?
Can anyone please help get around this "Problem with the SSL CA cert (path? access rights?)" problem.
Solution from here
nss-softokn breaks yum/rpm in CentOS 6 In order to fix it do the following:
rpm2cpio nss-softokn-freebl-3.14.3-19.el6_6.x86_64.rpm | cpio -idmv
cp libfreeblpriv3.* /lib64
yum updaten
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabledLinux Lnmp环境 curl ssl verion怎么从nss改成openssl
[问题点数:40分]
Linux Lnmp环境 curl ssl verion怎么从nss改成openssl
[问题点数:40分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
2014年11月 PHP大版内专家分月排行榜第三2014年6月 PHP大版内专家分月排行榜第三2014年4月 PHP大版内专家分月排行榜第三2014年2月 PHP大版内专家分月排行榜第三2013年11月 PHP大版内专家分月排行榜第三
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。

我要回帖

更多关于 lnmp curl 的文章

 

随机推荐