Https authentication failure solution-PHP source code

Source: Internet
Author: User
Tags http 200 ssl certificate
Summary of php curl ssl authentication errors and other common errors during https authentication failure solution:

/** Refer to add search to find the reference address: http://www.google.com.hk/search? Hl = zh-CN & newwindow = 1 & safe = strict & client = firefox-a & hs = fyZ & rls = org. mozilla % 3Azh-CN % 3 Aofficial & q = https + curl % E8 % B0 % 83% E7 % 94% A8 & btnG = Google + % E6 % 90% 9C % E7 % B4 % A2http: // bbs.chinaunix.net/thread-3654216-1-1.html#/ php curl common errors: SSL errors, bool (false) symptoms: php curl call https error troubleshooting method: Use curl in the command line to call. Cause: The SSL certificate cannot be verified in the server room. Solution: Skip the SSL certificate check. Curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false); symptom: php curl calls curl_exec to return bool (false), and the command line curl call is normal. Troubleshooting method: var_dump (curl_error ($ ch); return: string (23) "Empty reply from server" and then troubleshoot: curl_setopt ($ ch, CURLOPT_HEADER, true ); curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, false); returned: HTTP/1.1 100 ContinueConnection: close cause: php curl ends when it receives HTTP 100. you should continue to receive HTTP 200 solutions: curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ('CT :'));

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.