extract php setup to a separate module