Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if the operation of phpcms registered member fails?

Shulou Source: shulou.com Published: 2022-06-02 01:22:28 11月14日 Update

Editor to share with you what to do about the failure of the operation of phpcms registered members, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

Reason for failure:

Because the space service provider turned off the fsockopen () function.

Solution:

Find line 361 of phpcms/modules/member/classes/client.class.php and replace fsockopen with pfsockopen.

The workaround when the fsockopen () function is disabled:

If the server also disables fsockopen pfsockopen, replace it with other functions, such as stream_socket_client (). Note: the parameters of stream_socket_client () and fsockopen () are different.

Specific operations:

Search for the string fsockopen in the program (replace it with stream_socket_client (), then delete the port parameter "80" from the original fsockopen function and add it to $host.

Examples are as follows:

Before modification:

$fp = fsockopen ($host, 80, $errno, $errstr, 30)

Or

$fp = fsockopen ($host, $port, $errno, $errstr, $connection_timeout)

After modification:

$fp = stream_socket_client ("tcp://". $host. "80", $errno, $errstr, 30)

Or

$fp = stream_socket_client ("tcp://". $host. ":. $port, $errno, $errstr, $connection_timeout). This is all about the failure of phpcms registered members. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Functions members how to do registered members content parameters methods articles services different not much functions reasons at the same time most characters strings more service providers servers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei Xiaomi Linux MySQL