1

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 http://localhost/test/newfile.php

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-- http://127.0.0.1/

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

I am not sure what to do now.

Thanks for your answers!

1 Answer 1

0

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
  • Thanks for your comment ! The Linux section in the book I use (Learning PHP, MySQL & JavaScript, 4th Edition) being quite succinct, I looked for how to start my webserver elsewhere and I found the answer I needed here (askubuntu.com/questions/164652/…).
    – Dust009
    Aug 11, 2015 at 20:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .