Home >Database >phpMyAdmin >Reasons and solutions for slow access to phpmyadmin

Reasons and solutions for slow access to phpmyadmin

王林
王林forward
2019-12-28 16:53:023602browse

Reasons and solutions for slow access to phpmyadmin

Step one: Find the version_check.php file in the phpmyadmin directory and find the following 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); 
    }

Delete or comment out the above codes. Check that the upgrade takes 30 seconds. Time, there is no need to check whether there is a new version online.

The second step is to open the ./libraries/Util.class.php file and look for the following code:

return strftime($date, $timestamp);

Replace with the following code:

if(extension_loaded('gettext')) 
  return strftime($date, $timestamp);

China area can be replaced with The following code:

if(extension_loaded('gettext')){         
date_default_timezone_set('UTC'); 
return gmdate('Y-m-d H:i:s', $timestamp + 28800);}

Principle: Localized time formatting requires gettext support. If this function is not enabled in your environment, garbled characters will be returned, affecting #phpmyadmin ajax processing.

Recommended related articles and tutorials: phpmyadmin tutorial

The above is the detailed content of Reasons and solutions for slow access to phpmyadmin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:freebuf.com. If there is any infringement, please contact admin@php.cn delete