Kishore, have you managed to copy over the config.php file to new moodle folder (that will be moodle 2.9 files)?
As it could be multitude of different issues showing this error, You may find discussion about similar errors here, and see which solution works for you
https://moodle.org/mod/forum/discuss.php?d=214752
also you may want to check this