This wasted about 2 hours of my time ... so it may help someone else.
We recently upgraded our Moodle from 1.9 to 2.2 and then did a course by course import into 2.5 (our database had issues as it dated from v1.08 in 2003).
Our students arrived this week and the self enrolment plugin failed 'You can not enrol yourself in this course' - even though site and course self enrolment settings seemed fine.
The solution seems very strange but, with lots of trial and error as I couldn't find the solution on this forum, goes like this:
Go into the course (logged in as teacher/admin):
Course admin>users>enrolment methods>self enrolment> set 'Unenrol inactive after' to 'never' rather than our default '365 days'. Save. Self enrolment now works and students see the 'enrol' button when they click on the course to enter.
Even more strangely, self enrolment continued to work even if I put the setting back to 365 days later!!!