LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 08: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, 08: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, 11:30 AM   #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



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 01:27 PM
ircd.conf: "Connection failed. Error: Connection refused" hamish Linux - Software 3 03-10-2005 07:23 AM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 07:49 AM
lp filename yields "cannot open connection to localhost - Connection refused" jjge Linux - General 3 12-28-2003 11:02 PM
"connection refused" on port 993, when not coming from localhost spam4scott Linux - Networking 2 07-14-2003 06:35 AM

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

All times are GMT -5. The time now is 01:19 AM.

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