Get the App
SLTechnology News&Howtos  ›  Servers  › 

The solution to the login failure of phpcms v9

Shulou Source: shulou.com Published: 2022-06-02 05:50:17 10月03日 Update

This article is about the solutions to login failures in phpcms v9. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Phpcms v9 login failed? The solution to the failure of member login after https ssl of phpcmsv9

Many friends encountered such a problem when using phpcmsv9. After https of the whole station, the member center could not log in normally, specifically, there was no return value, indicating that the login failed, mainly because the system could not transfer data to the corresponding method through 443 when initializing phpsso. By troubleshooting the problem, we can see that in client.class.php, the default port used by the system is 80. So we only need to modify it in the following ways to solve the problem that members cannot log in after https:

Phpcms/modules/member/classes/client.class.php

Modify line 361 in as follows:

$port =! empty ($matches ['port'])? $matches [' port']: (strtolower ($matches ['scheme']) =' https'? 443: 80)

Line 386 is about to:

$fp = @ fsockopen (($ip? $ip: $host), $port, $errno, $errstr, $timeout)

Replace with

$contextOptions = array ('ssl' = > array (' verify_peer' = > false, 'verify_peer_name' = > false)) / / if there is a signed certificate / / $contextOptions = array (/ / 'ssl' = > array (/ /' verify_peer' = > true, / / 'cafile' = >' / path/to/cacert.pem',// 'CN_match' = >' indexroot.net', / / matching domain name / / 'ciphers' = >' HIGHpurse / SSLv2man / SSLv3 magic magic / 'disable_compression' = > true / /) /) $context = stream_context_create ($contextOptions); $fp = stream_socket_client ("ssl:// {$host}: {$port}", $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context); thank you for reading! This is the solution to the login failure of phpcms v9. I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Tags: Login method member question whole site content more system good practical member Center Domain name data article time friend look knowledge Port article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MariaDB NVidia macOS Huawei