So, I am running this PHP script and it's execution lasts for about 10 minutes or maybe even longer ( don't ask me what I'm doing :|;) )

After it's done, my PC runs slow, it probably eats up resources (don't which resources) so which command to use to free up memory and does it work in this script.

And, what would be even better, if someone could tell me another way to run long PHP scripts,something like command line, ( I will set it up if you think this would be good way)

Without details it's hard to help. What does the script and how, which OS are you running?

Windows XP,
and it's for loop
it's just that it has a lot of looping , lol

Everything is a loop. MySQL operations? Building arrays? Sessions? Setting vars? Is your computer swapping when executing the script? There is not only one solution, it depends on what is done and how. If you don't want to explain more, then, take a look to http://www.php.net/manual/en/function.memory-get-peak-usage.php

Try also a tool like Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653 to see if some related processes are still running after the script ends the execution.

OK than, fuck resources and memory,

can I make PHP executable and run it like windows .exe?
and will it work the same if I run it with cmd.

not to use browser :D

@ cereal thanks a lot :icon_cheesygrin:

I think so u r making infinite loop so it is causing our system to slow down....
After running the script just check the processes running ,their you will understand that which process is causing to slow down....
Also you can use firebug or chrome's inspect element to see the action performed and time taken to receive result .....

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.