There was a problem from server side.. Server restricted some characters, so when I am adding that content, it was considered as SQL injection by server, and it is giving Internal Server Error. And not generating log of it in error_log.
As all the solutions given by developers not working, so I finally reached to server for the support. As that code was working with previous server. They have solved it from their side.
So, if anyone facing this type of problem after migrating and even code also right. Then please talk with server support.
Thank you very much all of developers. who have supported this question and gave me solutions regarding this.