Ubuntu中Eclipse中的PDT/PHP插件不工作-"找不到页面"错误


PDT/PHP plugin in Eclipse in Ubuntu not working - “page not found” error

我没有成功地让PDT(PHP开发工具,SDK 2.0.2和2.1.2(插件在Ubuntu 11.04的Eclipse中工作。我在尝试运行php文件时遇到以下页面:

Not Found

The requested URL /TestPHP/tester.php was not found on this server. Apache/2.2.17 (Ubuntu) Server at localhost Port 80"

当我导航到127.0.0.1:8000/TestPHP/tester.php时,我看到tester.php文件中的代码被呈现为文本,它实际上并没有解释代码,而是直接打印它。

以下是我从安装到尝试执行的过程:安装Eclipse->安装PDT 2.1.2/2.0.2->使用Tasksel安装Lamp安装->在confd文件中添加ServerName localhost->启动Eclipse->打开PHP透视图->创建新的PHP项目->创建新PHP文件->在run按钮的子菜单上使用"run as PHP Web Page"运行文件。

在Lamp安装中似乎没有启用PHP模块。如果你使用的是Ubuntu的Apache&PHP包,您可以尝试在shell上运行:a2enmod php5