Home  >  Article  >  Backend Development  >  What should I do if php curl does not support https?

What should I do if php curl does not support https?

藏色散人
藏色散人Original
2021-05-24 09:19:382751browse

php curl does not support https methods: 1. Recompile and install a new version of curl; 2. Recompile and install php, then check the phpinfo() page, search for curl, and determine whether the https protocol is supported.

What should I do if php curl does not support https?

The operating environment of this article: Windows7 system, PHP7.1 version, DELL G3 computer

Solution to the problem that php-curl does not support https

The main reason is that the previously installed curl does not support the https protocol, resulting in php-curl also does not support the https protocol

#/server/app/services/bin/curl -V Check the version number of curl and the supported protocols

Solution:

1> Recompile and install the new version of curl

#cd /server/install/
#tar -xvf curl-7.37.0.tar.gz 
#cd curl-7.37.0
#./configure --prefix=/server/app/services
#make && make install
#/server/app/services/bin/curl -V   (查看是否支持https)

2> Recompile and install php, refer to the file for details , the compilation part of php

#cd /server/install/php-5.3.20
#make clean
#rm -f configure
#./buildconf --force
#./configure --prefix=/server/app/services/ --with-libxml-dir=/server/app/services/ --with-config-file-path=/server/app/services/ --enable-fastcgi --enable-force-cgi-redirect --with-curl=/server/app/services --enable-apc --enable-memcache --with-zlib-dir=/server/app/services/ --with-zlib --with-libmemcached-dir=/server/app/services/ --enable-memcached --enable-sockets --enable-fpm --enable-pdo  --enable-mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-openssl --with-freetype=/usr/local/freetype/ --enable-ftp  --enable-gd-native-ttf --enable-gd-jis-conv
#make
#make install
#reboot

Check the phpinfo() page, search curl, and determine whether the https protocol is supported

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if php curl does not support https?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn