only add php vars if php present, break up paths