LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2005, 09:13 AM   #1
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Rep: Reputation: 30
"Connection refused by localhost..." but why?


I was trying a simple php script for learning myself. The file was created in vi editor and the filename is 'hello.php'. The file is saved in /home/mydir directory. The script is as follows :
Code:
html>
<head>
<title>php test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Now if I want to run the file in Mozilla Firefox with "http://localhost/hello.php" then it shows an alert "The connection was refused when attempting to contact localhost".

Please help me with your opinion what is the mistake I am doing.

Regards
 
Old 03-18-2005, 09:21 AM   #2
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
The only way you would be able to access the file like that would be if you were running a web server on your machine and /home/mydir was the default directory for the web server.
 
Old 03-18-2005, 12:30 PM   #3
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
Actually I am not able to httpd on. Is the problem generating from this? If I want to turn on httpd service then I am getting an error message
Quote:
httpd failed. The error was: Starting httpd: /usr/sbin/httpd: error while loading shared libraries: libaprutil-0.so.0: cannot open shared object file: No such file or directory
[FAILED]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CUPS problem! "localhost:631, connection refused"!!! robbow52 Debian 5 03-04-2009 02:27 PM
ircd.conf: "Connection failed. Error: Connection refused" hamish Linux - Software 3 03-10-2005 08:23 AM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 08:49 AM
lp filename yields "cannot open connection to localhost - Connection refused" jjge Linux - General 3 12-29-2003 12:02 AM
"connection refused" on port 993, when not coming from localhost spam4scott Linux - Networking 2 07-14-2003 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration