You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

XAMPP环境phpMyAdmin 4.7.9创建视图报错:404/服务器连接丢失求助

Hey Rick, let's work through this frustrating phpMyAdmin view creation issue together—this is a common problem with older phpMyAdmin versions like 4.7.9 running on XAMPP, so here are the fixes I've used to resolve similar cases:

1. Adjust Execution Time Limits to Fix "Connection Lost" Errors

The "server connection lost" pop-up usually happens because creating a view (especially with complex queries) takes longer than the default time limits allow:

  • Open your phpMyAdmin config file (xampp/phpmyadmin/config.inc.php) and find the line $cfg['ExecTimeLimit']. Change its value to 300 (or higher if needed):
    $cfg['ExecTimeLimit'] = 300;
    
  • Next, update PHP's time limits in xampp/php/php.ini:
    • Set max_execution_time = 300
    • Set max_input_time = 300
  • Restart Apache and MySQL services in XAMPP after making these changes.
2. Fix the 404 Error from phpMyAdmin's Path Bug

Older phpMyAdmin versions like 4.7.9 have a known bug where the view creation form uses an incorrect URL path, leading to 404s:

  • Quick workaround: Skip the GUI and create your view directly with SQL. Run this query in the SQL tab:
    CREATE VIEW your_view_name AS SELECT [your_columns] FROM your_table WHERE [your_conditions];
    
  • Permanent fix: Open xampp/phpmyadmin/db_structure.php and locate the form that handles view creation. Look for the action attribute of the form—replace any hardcoded absolute paths with a relative path like 'db_structure.php' or ensure it matches your phpMyAdmin's actual URL path.
3. Clear Caches and Sessions to Resolve Stale Data

Sometimes cached browser data or stuck phpMyAdmin sessions cause weird UI glitches:

  • Clear your browser's cache and cookies (use Ctrl+Shift+Del on most browsers), then close all phpMyAdmin tabs and re-login.
  • Delete session files in xampp/phpmyadmin/tmp/—remove all files starting with sess_ to clear stale phpMyAdmin sessions.
4. Check for .htaccess Interference

If you have an .htaccess file in your phpMyAdmin directory, it might be blocking the view creation request:

  • Rename the .htaccess file to .htaccess.bak temporarily, then test creating a view again. If it works, review the rewrite rules in the original file to see which one is causing the issue.
5. Upgrade phpMyAdmin to a Compatible Version

phpMyAdmin 4.7.9 is pretty outdated and often conflicts with newer XAMPP components. Upgrading to a newer, compatible version (like 4.8.x, which supports MySQL 5.7/8.0 well) usually resolves these bugs:

  • Backup your current xampp/phpmyadmin/ directory.
  • Download a phpMyAdmin version that matches your XAMPP's MySQL version (check the phpMyAdmin release notes for compatibility).
  • Extract the new version into xampp/phpmyadmin/, then copy your old config.inc.php file into the new directory to preserve your settings.
  • Restart Apache and MySQL, then test view creation again.

内容的提问来源于stack exchange,提问作者Rick

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 09:19:08