Home > Article > CMS Tutorial > 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);
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);
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!