Changing to a working PHP script