View Full Version : PHP suddenly started running slow!

10-26-2006, 06:23 PM
So the other day, I was fiddling with the php.ini file on my web server trying to figure out why my 30mb file wasn't uploading, so I started changin some settings and then tried to upload my file again...

Out of nowhere, the php script started taking forever to execute!

you can see it here:


Now this page used to load instantly and suddenly it stared taking forever and I didn't even change the code! The only thing I changed was the php.ini file.

I restored php.ini back to what it was before I started fidling with it, restarted IIS 6.0 and its still running slow.

Please any help would be appreciated, thanks

10-26-2006, 06:28 PM
for every function call or block of code - add this around it:

at the start

$start = microtime(true);

at the end of the function call or block add

echo "Some description of the function or block took ".(microtime(true)-$start)."s<br />";

It wont make it faster but it will tell you which block of code is running slow