Fix php errors in credentials. closes #2704