Phpmyadmin4 + slow Access Solution

Source: Internet
Author: User

Many of my friends have found that phpmyadmin4.0 or later versions are much slower to open than before. If dedecms is used, they will encounter the same problem, the solution to dedecms is that phpmyadmin4 performs the same operation because a remote file is loaded, so we only need to find the code to delete it.

Many people found that phpmyadmin4 and later versions are much slower. In summary, the solution is provided.
1. Modify the localization time

Principle: gettext is required to format the localization time. If this function is not enabled in your environment, garbled characters are returned, affecting the processing of phpmyadmin ajax. this test is passed in the phpmyadmin 4.0.2 php 5.5.0 environment.
Modify:./libraries/Util. class. php file
 

The Code is as follows: Copy code
# 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 );

2. Blocking online upgrades

Principle: The official phpmyadmin website has been GFW. It will automatically check the Update Time and waste it in waiting for the wall. Just close it.
Modify:./version_check.php file. delete or comment out the following codes.

 

The Code is as follows: Copy code
$ 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 );
}

After exiting, log on to the system again to see if it has been enabled in seconds? Try it ~

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.