I tried to use an older version of Mathopd instead of using the latest version. I used 1.5b5 and Mathopd works fine now. It can now run .php files without trouble.
But I still don't know why modern versions of Mathopd has trouble with running .php files.
