fixed php if environment variable is not set