-   Linux - Networking (
-   -   "Connection refused by localhost..." but why? (

anindyanuri 03-18-2005 09: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 :

<title>php test</title>
<?php echo '<p>Hello World</p>'; ?>

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.


cowanrl 03-18-2005 09: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 12:30 PM

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

httpd failed. The error was: Starting httpd: /usr/sbin/httpd: error while loading shared libraries: cannot open shared object file: No such file or directory

All times are GMT -5. The time now is 05:44 PM.