沃梦达 / 编程问答 / php问题 / 正文

XAMPP 使用 PHP/MySQL 运行速度非常慢

XAMPP Running really slowly with PHP/MySQL(XAMPP 使用 PHP/MySQL 运行速度非常慢)

本文介绍了XAMPP 使用 PHP/MySQL 运行速度非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Windows 7 计算机上安装了 XAMPP.

I've got XAMPP installed on my Windows 7 Computer.

我已经开发了一段时间了,但是我的开发已经停止了,因为 XAMPP 正在渲染我的 PHP 页面 真的很慢.

I've been developing on it for a while now but my development has come to a grinding halt because XAMPP is rendering my PHP pages really slowly.

它运行得太慢了,超过了我在 PHP.ini 文件中设置的 30 秒超时限制.

It's running so slowly, that it's exceeding the 30 second time-out limit that I've got set in the PHP.ini file.

我不知道是什么突然阻止了它正常运行.

I don't know what it could be that has all of a sudden prevented it from running properly.

我尝试了以下方法:

  • 重新安装 XAMPP 并复制回我的 MySQL 数据库文件和网站文件
  • 在阅读了可能会起作用的文章后停用了我的防病毒/防火墙

但无济于事.

会不会是我的 MySQL 数据库损坏了?

Could it be that my MySQL database is corrupted?

并不是因为我的 MySQL 查询很慢,因为我的网站上有完全相同版本的代码.

It's not that my MySQL queries are slow, because I've got the exact same version of code live on my website.

我只是在寻找纠正它的建议,以便我可以继续开发.

I'm just looking for suggestions to rectify it so that I can continue the development.

这是 MySQL 错误日志的最后一位

111119 17:24:11 [注意] 插件FEDERATED"已禁用.111119 17:24:11InnoDB: InnoDB 内存堆被禁用 111119 17:24:11 InnoDB:互斥锁和 rw_locks 使用 Windows 联锁功能 111119 17:24:11InnoDB:压缩表使用 zlib 1.2.3 111119 17:24:11 InnoDB:初始化缓冲池,大小 = 16.0M 111119 17:24:11 InnoDB:缓冲池初始化完成 111119 17:24:11 InnoDB:支持的最高文件格式是梭子鱼.111119 17:24:12 InnoDB:等待后台线程启动 111119 17:24:13 InnoDB:1.1.8开始;日志序列号 1595675 111119 17:24:14 [Note] 事件调度程序:加载 0 个事件 111119 17:24:14 [Note]c:xamppmysqlinmysqld.exe:准备连接.版本:'5.5.16' 套接字:'' 端口:3306 MySQL 社区服务器 (GPL) 11111917:32:24【注意】c:xamppmysqlinmysqld.exe:正常关机

111119 17:24:11 [Note] Plugin 'FEDERATED' is disabled. 111119 17:24:11 InnoDB: The InnoDB memory heap is disabled 111119 17:24:11 InnoDB: Mutexes and rw_locks use Windows interlocked functions 111119 17:24:11 InnoDB: Compressed tables use zlib 1.2.3 111119 17:24:11 InnoDB: Initializing buffer pool, size = 16.0M 111119 17:24:11 InnoDB: Completed initialization of buffer pool 111119 17:24:11 InnoDB: highest supported file format is Barracuda. 111119 17:24:12 InnoDB: Waiting for the background threads to start 111119 17:24:13 InnoDB: 1.1.8 started; log sequence number 1595675 111119 17:24:14 [Note] Event Scheduler: Loaded 0 events 111119 17:24:14 [Note] c:xamppmysqlinmysqld.exe: ready for connections. Version: '5.5.16' socket: '' port: 3306 MySQL Community Server (GPL) 111119 17:32:24 [Note] c:xamppmysqlinmysqld.exe: Normal shutdown

111119 17:32:24 [注意] 事件调度程序:清除队列.0 个事件111119 17:32:24 InnoDB:开始关闭... 111119 17:32:25 InnoDB:关机完成;日志序列号 1595675 111119 17:32:25 【注】c:xamppmysqlinmysqld.exe:关机完成

111119 17:32:24 [Note] Event Scheduler: Purging the queue. 0 events 111119 17:32:24 InnoDB: Starting shutdown... 111119 17:32:25 InnoDB: Shutdown completed; log sequence number 1595675 111119 17:32:25 [Note] c:xamppmysqlinmysqld.exe: Shutdown complete

111119 17:33:26 [注意] 插件FEDERATED"已禁用.111119 17:33:26InnoDB: InnoDB 内存堆被禁用 111119 17:33:26 InnoDB:互斥锁和 rw_locks 使用 Windows 联锁功能 111119 17:33:26InnoDB:压缩表使用 zlib 1.2.3 111119 17:33:26 InnoDB:初始化缓冲池,大小 = 16.0M 111119 17:33:26 InnoDB:缓冲池初始化完成 111119 17:33:26 InnoDB:支持的最高文件格式是梭子鱼.111119 17:33:27 InnoDB:等待后台线程启动 111119 17:33:28 InnoDB:1.1.8开始;日志序列号 1595675 111119 17:33:28 [Note] 事件调度程序:加载 0 个事件 111119 17:33:28 [Note]c:xamppmysqlinmysqld.exe:准备连接.版本:'5.5.16' 套接字:'' 端口:3306 MySQL 社区服务器(GPL)

111119 17:33:26 [Note] Plugin 'FEDERATED' is disabled. 111119 17:33:26 InnoDB: The InnoDB memory heap is disabled 111119 17:33:26 InnoDB: Mutexes and rw_locks use Windows interlocked functions 111119 17:33:26 InnoDB: Compressed tables use zlib 1.2.3 111119 17:33:26 InnoDB: Initializing buffer pool, size = 16.0M 111119 17:33:26 InnoDB: Completed initialization of buffer pool 111119 17:33:26 InnoDB: highest supported file format is Barracuda. 111119 17:33:27 InnoDB: Waiting for the background threads to start 111119 17:33:28 InnoDB: 1.1.8 started; log sequence number 1595675 111119 17:33:28 [Note] Event Scheduler: Loaded 0 events 111119 17:33:28 [Note] c:xamppmysqlinmysqld.exe: ready for connections. Version: '5.5.16' socket: '' port: 3306 MySQL Community Server (GPL)

推荐答案

我以前在 xampp 上使用 PHP 时遇到同样的问题.过了一段时间它开始变慢,没有理由(代码,mysql,apache都很好).

I used to have the same issues with PHP on xampp. After a while it started slowing down, there was no reason for it (code, mysql, apache were all fine).

我让它工作的方式是通过 xampp 的命令行界面.我已将网络接口从 v4v6 切换到 v4;并且这已经成功了,然后在它再次减速之后不久......所以将v4回到v4v6修复了,但再次变得更糟.

The way I had gotten it to work was via xampp's command line interface. I had switched the networking interface from v4v6 to just v4; and that that had done the trick, then shortly after it slowed down again... so doing the v4 back to v4v6 fixed, but again worstened.

所以,在使用 xampp 多年后,我发现 wamp 效果最好,并且在 Windows 7 上没有问题.

So, after working with xampp for a number of years, I found that wamp worked best and has no issues on Windows 7.

下载 wamp;它也只有 16mb(与 xampp 的 44mb 相比).http://wampserver.com/

Download wamp; it's only 16mb too (compared to xampp's 44mb). http://wampserver.com/

这篇关于XAMPP 使用 PHP/MySQL 运行速度非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:XAMPP 使用 PHP/MySQL 运行速度非常慢

基础教程推荐