简体   繁体   English

如何判断PHP安装是否损坏? PHP页面快速显示,但持续加载几秒钟

[英]How can I tell if a PHP install is corrupt? PHP pages display quickly, but continue to load for seconds

I'm trying to convince a guy in IT that the PHP installation he gave me is corrupt (somehow). 我试图说服IT部门的人,他给我的PHP安装已损坏(以某种方式)。 He did an upgrade to the latest PHP and since then, PHP pages have been slow. 他进行了最新PHP的升级,此后PHP页面运行缓慢。 In a weird way. 以一种奇怪的方式。

If I visit a PHP page, the page displays instantly but the activity monitor in Safari shows activity for ~5 more seconds. 如果我访问PHP页面,该页面会立即显示,但Safari中的活动监视器会再显示活动约5秒钟。 When I use Safari's inspector, it looks like lots of things load, then there's a huge pause, then more things load. 当我使用Safari的检查器时,看起来好像加载了很多东西,然后停了下来,然后加载了更多东西。 If I load a blank PHP page that doesn't reference CSS files or anything, it still sits for ~5 seconds. 如果我加载一个空白的PHP页面,该页面不引用CSS文件或其他任何内容,它仍会停留约5秒钟。

Safari的网络检查器

Any ideas what could be causing this? 任何想法可能是什么原因造成的? It's hard for me to Google it because "PHP page loads slow" involves lots of different scenarios. 对于Google来说,这很难,因为“ PHP页面加载缓慢”涉及许多不同的情况。

Is there a way I could somehow pinpoint why PHP loading is longer than it was before the upgrade? 有什么办法可以确定为什么PHP的加载时间比升级前更长?

If you set up a sample page with only the following in it, do you get the same behavior? 如果您设置的示例页面仅包含以下内容,您是否会得到相同的行为? This will show that php works . 这将表明php 有效 From a speed / content delivery point of view, you need to then determine what is causing the slowdown. 从速度/内容交付的角度来看,您需要确定是什么导致了速度下降。 phpinfo(); phpinfo(); should load right away and display to the browser without much delay ... 应该立即加载并立即显示给浏览器...

<?php phpinfo(); ?>  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM