Clear as mud.
The only part of your first post that I was replying to was this:
can I set up a php server with sql database on the same machine where the client resides
And I said, "Yes, you can do that."
But if that's NOT what you want, then what is it you DO want?