even with all the variations of the sed code i couldn't get it to update automatically. Modified the php in vi, saved, updated via the advanced tab, still wouldn't connect.
started backtracking into the .sh, then the .conf file and my conf file had all the ^M's. Once i manually modified it everything worked.