Developing websites in PHP in Eclipse

lostinthought

Disciple
Jul 22, 2007
147
0
0
35
Im a J2EE/Java programmer and know the conventional method of setting up websites in eclipse. (dynamic web project->make server->add project to server->start server and goto browser)

I want to learn php and cant seem to get the setup right!! :(

ok heres what im doing

1. Downloaded fresh eclipse helios from
Eclipse Downloads
and downloaded "Eclipse for PHP Developers"

2. Fired up eclipse and made a new "PHP Project"

3. Right inside the project directory made a file "index.php" with the code
Code:
<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
echo "Hello World!";
?>
</body>
</html>

4. After saving, right click on "Index.php" and selecting "Run As->PHP Web Page"

5. I get an error in the browser "This program cannot display the webpage"

I know im missing somethings here. I tried making a server but could not as there is not one server template on this version of eclipse :S

Please help :)

Thanks
 

lostinthought

Disciple
Jul 22, 2007
147
0
0
35
how do i integrate WampServer with Eclipse?

is Eclipse even the right IDE for PHP development??..or are there other which are simpler to use??..:-/
 

rahul21

Disciple
May 20, 2009
124
1
0
37
do "Run as phpscript" instead , since without apache (server) you cannot run it as a php webpage .
 

anaghdesai

Disciple
May 26, 2008
95
0
26
36
systembuilder said:
download and install wamp first ... ensure that its running in green mode(which means all is well :D) and then run your php script after copying it to the www folder(you can also run it from anywhere else but putting it there is what i prefer)
You HAVE to put it in the www folder. left click on the green W icon on the taskbar and select LOCALHOST, and your page shld appear down in the list. run it.

Also, I think Net Beans is better than Eclipse.
 

MRTZ

Disciple
Jun 17, 2011
34
1
9
I think Eclipse has its own localhost, and if its on then WAMP localhost will not turn on... Check that first ..