The Final Cause of slow loading of phpmyadmin4 series is that phpmyadmin's official website is not frequently opened recently, and the phpmyadmin page automatically checks the official online program version updates, so when you go to the phpmyadmin Management page and click the database, phpmyadmin keeps trying to connect to the official website, which slows down the entire open process.
The final solution is to prevent phpmyadmin from checking for updates and find the version_check.php file in the phpmyadmin directory. The specific modification is as follows:
Copy codeThe Code is as follows:
If (isset ($ _ SESSION ['cache'] ['version _ check'])
& Time () <$ _ SESSION ['cache'] ['version _ check'] ['timestamp'] + 3600*6
){
$ Save = false;
$ Response = $ _ SESSION ['cache'] ['version _ check'] ['response'];
} Else {
// $ 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 );
//}
}
The above code is to cancel the phpmyadmin connection to the official website version. json by commenting out the section in the middle of else {...} to check for updates
After the modification, phpmyadmin immediately returns to the second.
Appendix: Solution for another netizen
Copy codeThe Code is as follows:
Step 1:
# File name./libraries/Util. class. php file.
# 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 );
# Principle: gettext is required to format the localization time. If this function is not enabled in your environment, garbled characters will be returned, affecting the processing of phpmyadmin ajax. this test is passed in the phpmyadmin 4.0.2 php 5.5.0 environment.
# Step 2:./version_check.php file.
$ 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 Code. The reason is that the official website has been suspended, which takes 30 seconds to check the upgrade.
# After exiting, log on to the system again to see if it has been enabled in seconds?
# Try it.