junaidp
junaidp

Reputation: 11221

php hello world in eclipse not working

I have created a simple hello world php app in eclipse with the name od FirstPHP when i try to run it as "run as php web page" it tries opening the page
http://localhost/FirstPhp/first.php in eclipse web browser
and got the message web page not found

when i open http://localhost:8080/ it works fine , so tomcat is ok

Any Suggestion

Upvotes: 1

Views: 1707

Answers (2)

Hans Wassink
Hans Wassink

Reputation: 2577

  1. Install your server correct. Why do you use Tomcat in the first place. Thats not primarily used for PHP, but for JSP.
  2. Check if localhost:80 works fine too, thats where he wants to go...
  3. Make sure you set the DocumentRoot in Eclipse.

Gr.

Upvotes: 0

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385405

AFAIK, Eclipse doesn't automagically configure your webserver so that its document root is suddenly wherever sits the project that you just so happen to currently be working on.

Configure your webserver to use the proper path as DocumentRoot.

I also notice that you used the wrong port number in the first instance.

Upvotes: 1

Related Questions