Rizwan: I don't know how to fix this. I was looking for a good installation/migration guide but could only find this:
http://www.php.net/manual/en/faq.mig...gration5.mysql
http://docs.moodle.org/en/RedHat_Linux_installation

Another thing that's always advisable is googling the error messages you get ..
Cya & Good luck!