The stability of a horizontal fluid layer bounded on either side by porous layers with different permeabilities is examined for different non-uniform basic temperature gradients using general velocity and thermal conditions at the boundaries. In the case of sudden heating and cooling, analytical solutions are obtained using single-term Galerkin expansion. Numerical solutions are obtained for all possible combinations of basic temperature gradients and boundary conditions in respect of velocity and temperature. General conclusion about the thermal depth and the destabilizing effects of the basic temperature gradients are presented. The classical results of free-free, rigid-free and rigid-rigid boundaries with isothermal or adiabatic boundaries are recovered as limiting cases of the present study.