minor changes to php for instrux and avoiding infinite script execution