狠狠色丁香婷婷综合尤物,艳丽少妇25P,男人和女人在做性视频,黑人太粗太深了太硬受不了了

Board logo

標(biāo)題: [已解決] 解決curl獲取https時(shí)顯示502的問(wèn)題【ngnix下】 [打印本頁(yè)]

作者: skypirate    時(shí)間: 2017-3-15 19:34     標(biāo)題: 解決curl獲取https時(shí)顯示502的問(wèn)題【ngnix下】

本帖最后由 skypirate 于 2017-3-15 19:37 編輯

環(huán)境是php5.2.17、lnamp,訪問(wèn)http沒(méi)問(wèn)題,訪問(wèn)https時(shí)就出現(xiàn)502,以前解決過(guò)一次,但沒(méi)記錄步驟,重裝系統(tǒng)后又出現(xiàn)了這個(gè)問(wèn)題,直接懵圈。升級(jí)到php5.3可以解決這個(gè)問(wèn)題,但以前的代碼是用zend加密的,只能在5.2.17下運(yùn)行,對(duì)接的API又必須訪問(wèn)https,只能又廢了一下午的時(shí)間找資料,記錄下來(lái),以備忘!

編譯安裝curl,重新編譯php,使php的curl模塊支持https。

具體步驟:

1、下載curl
wget dl2.admin5.com/php/curl-7.37.1.tar.gz
tar zxvf curl-7.37.1.tar.gz  #下載

2、安裝curl

cd curl-7.37.1


./configure --prefix=/usr/local/curl --with-gssapi --enable-tls-srp --with-libmetalink  #配置

make  #編譯

make install  #安裝

3、重新編譯php

wget -c http://dl.wdlinux.cn:5180/soft/php-5.2.17.tar.gz
tar zxvf php-5.2.17.tar.gz
cd php-5.2.17
./configure --prefix=/www/wdlinux/php-5.2.17 --with-config-file-path=/www/wdlinux/etc --with-mysql=/www/wdlinux/mysql --with-iconv=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-inline-optimization --with-curl-dir=/usr/local/curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --with-apxs2=/www/wdlinux/apache/bin/apxs
make
make install
rm -f /www/wdlinx/php
ln -s /www/wdlinux/php-5.2.17 /www/wdlinux/php
service httpd restart
make #編譯

make install #安裝

4、重啟apache使設(shè)置生效

service httpd restart #重啟

故障解決!

5、測(cè)試

以下代碼,保存為phpinfo.php

<?php

phpinfo();

?>

上傳到網(wǎng)站目錄,查找curl,如下圖所示,說(shuō)明安裝成功!
1.png
參考鏈接:
http://www.sdxinquan.com/bbs/viewthread.php?tid=38067&highlight=qq

圖片附件: 1.png (2017-3-15 19:32, 29.84 KB) / 下載次數(shù) 6644
http://www.sdxinquan.com/bbs/attachment.php?aid=7140&k=0e46a29d2236fa923b843279fd4abaa1&t=1746180984&sid=7ei1ZB






歡迎光臨 WDlinux官方論壇 (http://www.sdxinquan.com/bbs/) Powered by Discuz! 7.2