Home > CMS Tutorial > PHPCMS > phpcms membership registration operation failed

phpcms membership registration operation failed

王林
Release: 2019-11-09 15:41:05
Original
3245 people have browsed it

phpcms membership registration operation failed

Cause of failure:

Because the space service provider has closed the fsockopen() function.

Solution:

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

Solution to the disabled fsockopen() function:

The server also disables fsockopen pfsockopen, then use other functions instead, 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 and replace it with stream_socket_client((), and then delete the port parameter "80" in the original fsockopen function. And add it to $host.

Examples are as follows:

Before modification:

   $fp = fsockopen($host, 80, $errno, $errstr, 30);
Copy after login

or

$fp = fsockopen($host, $port, $errno, $errstr, $connection_timeout);
Copy after login

After modification:

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

or

  $fp = stream_socket_client("tcp://".$host.":".$port, $errno, $errstr, $connection_timeout);
Copy after login

Recommended tutorial: phpcms tutorial

The above is the detailed content of phpcms membership registration operation failed. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template