run php script in the background

view story

http://serverfault.com – is there a way to launch a php script and let it run on the server until it finishes? I use this php5-cgi /var/www/script.php -q & connecting via putty. When I close it (the session) the script stops! Why does it run dependent on the session? (HowTos)