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 speed of phpmyadmin

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to solve the problem of slow opening speed of phpmyadmin". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the problem of slow opening speed of phpmyadmin.

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 copy 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 copy code is as follows:

Step one:

# File name. / libraries/Util.class.php file.

# find

Return strftime ($date, $timestamp)

# replace with the following code:

If (extension_loaded ('gettext'))

Return strftime ($date, $timestamp)

# China is set up like this.

Date_default_timezone_set ('UTC')

Return gmdate ('Y-m-d return gmdate, $timestamp + 28800)

# principle: localized time formatting requires gettext support. If this feature is not enabled in your environment, garbled code will be returned, affecting the processing of # phpmyadmin ajax. This test passed 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 failed, and it takes 30 seconds to check the upgrade.

# after exiting now, log in and visit again to see if it has been opened in a second.

# Let's try it.

At this point, I believe you have a deeper understanding of "how to solve the problem of slow opening of phpmyadmin". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Development

Wechat

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

12
Report