A linear stability analysis of the basic uniform flow in a horizontal porous channel with a rectangular cross section is carried out. The thermal boundary conditions at the impermeable channel walls are: uniform incoming heat flux at the bottom wall, uniform temperature at the top wall, adiabatic lateral walls. Thermoconvective instabilities are caused by the incoming heat flux at the bottom wall and by the internal viscous heating.Linear stability against transverse or longitudinal roll disturbances is investigated either analytically by a power series formulation and numerically by a fourth order Runge-Kutta method. The special cases of a negligible effect of viscous dissipation and of a vanishing incoming heat flux at the bottom wall are discussed. The analysis of these special cases reveals that each possible cause of the convective rolls, bottom heating and viscous heating, can be the unique cause of the instability under appropriate conditions. In all the cases examined, transverse rolls form the preferred mode of instability.