Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
10-26-2006, 05:23 PM #1
- Join Date
- Jul 2006
- Thanked 0 Times in 0 Posts
PHP suddenly started running slow!
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, 05:28 PM #2
- Join Date
- Feb 2005
- Bradford, UK
- Thanked 66 Times in 65 Posts
for every function call or block of code - add this around it:
at the start
at the end of the function call or block addPHP Code:
$start = microtime(true);
It wont make it faster but it will tell you which block of code is running slowPHP Code:
echo "[i]Some description of the function or block[/i] took ".(microtime(true)-$start)."s<br />";