The spectral shift due to temperature in the photonic bandgap (PBG) of an all-solid PBG fiber is investigated, aiming at discrete and distributed temperature sensing. A temperature rise induces a red shift in the bandgap spectra, which can be easily and precisely monitored by measuring the fiber transmission near one of the band edges. Two different situations that are potentially compatible with distributed and quasi-distributed sensing were investigated: heating a 2 m section of a longer (~10 m) fiber, and heating the whole extension of a fiber that is tens of centimeters in length and was spliced to conventional fibers on both sides. The latter setup yielded bandgap spectral shifts up to ~35 pm/°C. Aiming at discrete sensing, a short (~50 mm) fiber section was subjected to a tight bend so as to exhibit increased temperature sensitivity. Choosing the position of the bend allows for reconfiguration, on demand, of the sensor. A semi-analytical method to identify the spectral position of bandgaps was used to model the fiber transmission, as well as the bandgap shift with temperature, with consistent results.