In this paper, the general variable coefficient nonlinear Schrdinger equation for the optical fiber is investigated based on the extended cubic nonlinear Klein-Gordon equation. The soliton solutions under non-chirp case are discussed, and some new exact solutions, including the bright soliton, the dark soliton and the soliton-like solution are obtained. The standard nonlinear Schrdinger equation and four kinds of the variable coefficient nonlinear Schrdinger equation are all corresponding special cases. In addition, some interesting results for the optical fiber system with periodic gain or loss are also obtained.