When you try to run/debug a PHP script, the “PHP Web Application” Run Configuration inserts the name of the PHP project into the URL. The auto-generate bug affects the “Launch URL” dialog. The project name in the auto-generated URL is unnecessary. Unchecking the “Auto Generate” option makes no difference. There is no way to turn it off.
Visual Studio does not behave this way. To top it all, I read one post where one fool requesting this specific feature/bug! Maybe it makes sense for MVC devs. Their projects look anemic without a million or two folders. I made several attempts in the past to learn PHP but this bug/annoyance turned me off each time. Curiously, this feature/bug was not present in Zend-PHP (trial), which is based on the same open source plugin.
Anyway, the offending behaviour is caused by the “org.eclipse.php.server.ui_[some-version-number].jar” plugin. You need to switch to the Eclipse Plugin Development perspective to work with it. After modifying the source, you can export your plugin project as a “jar” back to its original location. I would advise you to make a backup of the original plugin before you try this. Anyway, the files to be modified are:
- /org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/PHPWebPageLaunchShortcut.java (in function constractURL)
- /org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerLaunchConfigurationTab.java (in function formatFileName)
After the above changes, both dialogs become functional. My project name was PHPTest and it no longer gets inserted into the launch URL.