search
HomeBackend DevelopmentPHP ProblemWhat to do if the PHP certificate authorization fails

Solution to PHP certificate authorization failure: 1. Enter the server terminal and execute the "wget ​​--no-check-certificate https://curl.haxx.se/ca/cacert.pem" command to download the root certificate ; 2. Modify the configuration file; 3. Restart PHP.

What to do if the PHP certificate authorization fails

The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.

What should I do if the PHP certificate authorization fails?

Solution to the PHP environment (Pagoda Panel) prompt SSL certificate problem: certificate has expired

Recently, when helping a customer troubleshoot a problem, I encountered a 500 error and turned on the PHP Debug mode. I found that the detailed error content is as follows:

AWS HTTP error: cURL error 60: SSL certificate problem: certificate has expired

When I saw this prompt, I thought that the SSL certificate of the target address had expired, but I repeatedly confirmed that the target SSL certificate was normal and that other devices could request it. However, the PHP environment of the pagoda could not request the target URL. , try changing the PHP version and still the problem remains.

Solution

Enter the server terminal and execute the following command to download the root certificate:

#下载根证书
wget --no-check-certificate https://curl.haxx.se/ca/cacert.pem

Find your corresponding PHP version in the Pagoda background - Settings - Configuration file.

What to do if the PHP certificate authorization fails

Search for the following 2 keywords: curl.cainfo/openssl.cafile and change the path of these 2 parameters to the path of the cacert.pem certificate above, for example :

curl.cainfo = /xxx/cacert.pem
openssl.cafile=/xxx/cacert.pem

Then restart PHP, test again, and the problem is solved.

What to do if the PHP certificate authorization fails

Recommended learning: "PHP Video Tutorial" "Pagoda Panel Usage Tutorial"

The above is the detailed content of What to do if the PHP certificate authorization fails. 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor