Fsockopen pfsockopen function is disabled, SMTP sends an unhealthy workaround, Fsockopen function is disabled _php tutorial

Source: Internet
Author: User
Tags php website

Fsockopen pfsockopen function is disabled, SMTP sends an unhealthy solution to the message, Fsockopen function is disabled


A: The recent hacking exploit program vulnerability injection using Fsockopen for Phpddos attacks, causing some server instability, now the dangerous function Fsockopen temporarily disabled, some program functions may be problematic, the following list of known issues and common solutions:

General 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 make the connection number of attacks.
program file path known to use the Fsockopen function (add p before fsockopen, i.e. Fsockopen modified to Pfsockopen)

Second: The server is also disabled Fsockopen Pfsockopen, then use other functions instead, such as stream_socket_client (). Note: The parameters for Stream_socket_client () and Fsockopen () are different.
Specific operation:
Search for the string in the program Fsockopen (replace with Stream_socket_client (, then, the port parameter "80" in the original Fsockopen function is deleted and added to the $host.
Examples such as the following

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 of the file list in the Web system:
The domestic mainstream PHP website involves the Fsockopen function of the file list in the Web system:

DEDECMS:

Copy the 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 the 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 the 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 the 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

http://www.bkjia.com/PHPjc/1057476.html www.bkjia.com true http://www.bkjia.com/PHPjc/1057476.html techarticle fsockopen pfsockopen function is disabled, SMTP send mail is not normal resolution, Fsockopen function is disabled one: recent hacker exploit program vulnerability injection after using Fsockopen to Phpddo ...

  • Related Article

    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.