Applicants who have been granted discretionary leave to remain outside the immigration rules are eligible to apply for settlement after 6 years. The Home Office policy has in the past been to grant discretionary leave where an applicant raised human rights or medical issues.
If the leave was granted before 9 July 2012 then after accruing 6 years continuous residence they will be eligible to apply for ILR.
However applicants who have been granted discretionary leave after 9 July 2012 will need to complete at least 120 months, (i.e. a total of 10 years normally consisting of four 2.5 year periods of leave), before being eligible to apply for settlement.