by Ken Task.
A little Googling rendered this link:
So ... there are 5 offerings listed on the page/link above. Which is yours?
The other ... you have Moodle 2.5.x. Wonder if their .htaccess trick or 'by plugin' set your PHP to certain version of PHP and that's why the check in the 2.5.x sees the version it sees.
How are you attempting to upgrade? Same directory of code but over writing contents? (which one should not do) or do you plan to erase all that could be seen in the moodle code directory (that might not remove the hidden from normal viewing .htaccess file which contains the line for setting PHP version).
'spirit of sharing', Ken