Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry 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:

    http://www.drachmaninstitute.org/com...rojectlist.php

    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

  • #2
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    for every function call or block of code - add this around it:

    at the start
    PHP Code:
    $start microtime(true); 
    at the end of the function call or block add
    PHP Code:
    echo "[i]Some description of the function or block[/i] took ".(microtime(true)-$start)."s<br />"
    It wont make it faster but it will tell you which block of code is running slow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •