How to get rid of "Connecting to 127.0.0.1:80... failed: Connection refused."?

I started learning PHP a week ago and I installed Eclipse for PHP. I have tried some basic codes since but today, when I runned a code to create a txt file (using fopen, fwrite, fclose), Eclipse said:

Unable to load page

Problem occurred while loading the URL

Cannot connect to destination (localhost)

It is the same php file I used since the beginning so it is quite weird.

I am very new to Linux so I do not know what kind of information to provide so someone can help me. I checked other related questions and I could not understand all the information guys provided.

I use ubuntu 14.04.

Nevertheless, I tried to type wget 127.0.0.1 in the terminal and the response was:

--2015-08-11 21:07:35--

Connecting to 127.0.0.1:80... failed: Connection refused.

I am not sure what to do now.

Thanks for your answers!

1 Answer

It means that, on your system (localhost) there is no program listening to TCP port 80. You need to start a webserver, e.g., apache2 and configure it to handle your requests. Reread the beginning of your course, and see what it says about webserver requirements.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like