'''Finally Done it'''
As described before i got the following error messages while installing from ports.
can't cd to /usr/ports/devel/autoconfig262/work/autoconfig-2.62:No such file or directory
patch patch-autoconf.texi fail to apply cleanly.
Error code 1
Stop in /usr/ports/devel/autoconf262.
I again looked at those error messages. I installed the package autoconfig262 (i dont know why we need this package. At least we need this package to install PHP5. So i did it with pkg_add -r autoconfig262 and again tried php5 with ports methods and every thing is fine.