1

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

2
  • what error you are getting I guess 404 ? Commented Jul 21, 2011 at 9:26
  • So your settings of where the file is (on web server) are incorrect? Commented Jul 21, 2011 at 9:26

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0
  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.

2 Comments

thanks , but what exactly you mean by "install server correct" if not tomcat , what should i use.
Well, you already have Apache installed obviously, because TomCat is an Apache extension to run Java Server Pages on Apache. To run PHP you need Apache ith PHP installed. For that, check apachefriends.org , they have the easiest setup (With TomCat addon if you really need it) .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.