I have tried setting the root using php, but testing on mamp and it just doesn't seem to work. Keeps showing errors