added prerunning and setup to php and rails4