PHPMyAdmin: slow access-PHP source code

Source: Internet
Author: User
Tags wordpress blog
PHPMyAdmin and wordpress blog will automatically access the website. If the website is slow, the access will be slow, next, let's take a look at how to solve the problem of slow access to PHPMyAdmin. PHPMyAdmin and wordpress blogs will automatically access the website. If the foreign website is slow, the access will be slow, let's take a look at how to solve the problem of slow access and PHPMyAdmin access.

Script ec (2); script

1. Disable Automatic update Detection

By default, PHPMyAdmin files may be blocked due to online upgrade, so we will directly block the upgrade detection. Find the version_check.php file and find the following file.

The Code is as follows:

$ Save = true;
$ File = 'HTTP: // www.phpmyadmin.net/home_page/version.json ';
If (ini_get ('Allow _ url_fopen ')){
$ Response = file_get_contents ($ file );
} Else if (function_exists ('curl _ init ')){
$ Curl_handle = curl_init ($ file );
Curl_setopt ($ curl_handle, CURLOPT_RETURNTRANSFER, 1 );
$ Response = curl_exec ($ curl_handle );
}

Delete or comment out the script file that is missing.

2. Modify the localization time

Find the libraries/Util. class. php file and modify it.

The Code is as follows:

# Search
Return strftime ($ date, $ timestamp );


# Replace it with the following code:
If (extension_loaded ('gettext '))
Return strftime ($ date, $ timestamp );


# Set this in China.
Date_default_timezone_set ('utc ');
Return gmdate ('Y-m-d H: I: s', $ timestamp + 28800 );

According to other netizens on the Internet, the time format is different from that on our local computer, resulting in processing speed problems. It takes a long time to verify and return the value.

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.