Fsockopen pfsockopen function is disabled, SMTP send mail an abnormal solution _php tips

Source: Internet
Author: User
Tags php website

One: Recent hackers use Fsockopen to carry out phpddos attacks, resulting in some of the server instability, now the risk function Fsockopen temporarily disabled, some program features may be problematic, the following list of known issues and general solutions:

Common solutions:
Find the Fsockopen function in the program, replaced by: Pfsockopen, you can solve all the problems, the difference between the two functions is pfsockopen to maintain keep-alive, so that hackers can not connect number of attacks.
The path to the program file that is known to use the Fsockopen function (plus p before fsockopen, that is, Fsockopen modified to Pfsockopen)

Two: The server also disables the Fsockopen Pfsockopen, then replaces it with other functions, such as stream_socket_client (). Note: The parameters for Stream_socket_client () and Fsockopen () are different.
Specific actions:
The string Fsockopen in the search program (replaced by Stream_socket_client (), and then the port parameter "80" in the original Fsockopen function is deleted and added to the $host.
example below

Before modification:

$fp = Fsockopen ($host, $errno, $errstr, 30);

After modification:

$fp = Stream_socket_client ($host.) ", $errno, $errstr, 30);
The domestic mainstream PHP website involves the Fsockopen function in the website system file list:
The domestic mainstream PHP website involves the Fsockopen function in the website system file list:

DEDECMS:

Copy Code code as follows:

source\function\function_core.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_client\client.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_client\lib\sendmail.inc.php
uc_client\model\misc.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_server\install\func.inc.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_server\lib\sendmail.inc.php
uc_server\model\misc.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish

discuz! 2.5:

Copy Code code as follows:

source\function\function_core.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_client\client.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_client\lib\sendmail.inc.php
uc_client\model\misc.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_server\install\func.inc.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish
uc_server\lib\sendmail.inc.php
uc_server\model\misc.php This file has 2 Fsockopen, the other is Pfsockopen, please pay attention to distinguish

ECMs (Empire):

e\class\class.smtp.php

Ecshop:

Copy Code code as follows:

admin\index.php
demo\includes\lib_updater.php
includes\cls_smtp.php
includes\cls_transport.php
includes\lib_base.php
includes\modules\payment\paypal.php


Shopex

Copy Code code as follows:

core\api\include\api_utility.php
core\api\tools\1.0\api_b2b_1_0_tools.php
core\func_ext.php
core\lib\nusoap.php
core\lib\uc_client\client.php
instal\svinfo.php
plugins\passport\passport.ucenter.php
plugins\payment\pay.nochek.php
plugins\pay.paypal.php
plugins\pay.paypal.server.php
plugins\pay.paypal_cn.php

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.