Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of slow opening of phpmyadmin

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how to solve the problem of slow opening of phpmyadmin. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The ultimate reason for the slow loading of phpmyadmin4 series is that phpmyadmin's official website is often unable to open recently, and the phpmyadmin page will automatically check the program version update on the official website, so when you go to the phpmyadmin management page and click on the database, phpmyadmin has been trying to connect to the official website to slow down the whole opening process.

The final solution is not to let phpmyadmin check for updates, but to find the version_check.php file in the phpmyadmin directory. The specific modifications are as follows:

The 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 checks for updates by commenting out the middle section of else {.} to cancel the phpmyadmin connection to the official website version.json

After the modification, phpmyadmin immediately returned to the second drive.

Attached: another netizen's solution

The code is as follows:

Step 1: # File name. / libraries/Util.class.php file. # find return strftime ($date, $timestamp); # replace it with the following code: if (extension_loaded ('gettext')) return strftime ($date, $timestamp); # set this up in China. Date_default_timezone_set ('UTC'); return gmdate (' Y-m-d Hrangi timestamp slots, $timestamp + 28800); # principle: localization time formatting requires gettext support. If this feature is not enabled in your environment, garbled codes will be returned, affecting the processing of # phpmyadmin ajax. This test is verified on 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 has hung up, so it takes 30 seconds to check the upgrade. # now exit, log in and visit again, and see if it's already open. # Let's try it. Thank you for reading! This is the end of this article on "how to solve the problem of slow opening of phpmyadmin". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report