On a class of elliptic problems with singular weights