I know it is an old thread, but I am getting similar issue again, i created a sample php file, with just hello world in echo statement, zipped it and uploaded it in install more portlets.
It installed successfully, and I am able to see it in the add component menu, but when I add it, there is a open hyperlink and when I click that I get a 404 error page. Here is screen shot of what is happening.

Let me know if I have to change any configuration settings.
My php code is
1<?php
2 echo 'Hello World';
3?>
Please sign in to flag this as inappropriate.