LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   "Connection refused by localhost..." but why? (https://www.linuxquestions.org/questions/linux-networking-3/connection-refused-by-localhost-but-why-303147/)

anindyanuri 03-18-2005 08:13 AM

"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

cowanrl 03-18-2005 08:21 AM

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.

anindyanuri 03-18-2005 11:30 AM

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]


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