A nonlocal singular boundary value problem for second-order differential equations