Web Hosting Talk







View Full Version : PHP installation


fahadfaraz
04-24-2004, 03:59 AM
Hi,

I am a newbie to php and currently using redhat linux 8 (2.14.18) (Psyche)

I had installed Apache Web server from the list of packages and it installed the php 4.2.. version as well.

I then created a simple hello.php file and saved it in /home/user/ directory and tried to execute it using mozilla by writting "localhost/hello.php". The browser pops up the following error:-

"The connection was refused when attemting to contact local host" :confused:

Any ideas to what i need to do . Any help is very much appreciated.

:)

fahadfaraz
04-24-2004, 04:14 AM
By the way the current security settings are set to high and also do not allow the use of http,ftp... protocols . I had tried changing these settings as well but they are always reset to high i.e will not change what so ever i do.

jonaskb
04-24-2004, 05:47 AM
Originally posted by fahadfaraz
"The connection was refused when attemting to contact local host"

Are you sure that Apache is actually running? Were you able to start and use Apache before you installed PHP?

ForumsAddict
04-24-2004, 06:27 AM
Hi,

How do i start Apache? I know it is installed. PHP 4.2.. version was automatically installed as part of the package available for Apache on the redhat linux 8.0 CD

fahadfaraz
04-24-2004, 06:32 AM
Hi,

How do i start Apache? I know it is installed. PHP 4.2.. version was automatically installed as part of the package available for Apache on the redhat linux 8.0 CD

Burhan
04-24-2004, 07:14 AM
as superuser, execute apachectl start

beowulfdk
04-24-2004, 08:12 AM
To control apache:

service httpd start|stop|restart

To test that apache is running and allowed to serve pages (HTTP) just type http://localhost/ or http://127.0.01/ both of those urls should give a apache default home page telling you that the webserver has been installed correctly.

Next "home/user/ " as you say would not correspond to the "localhost/" url. You might need to try http://localhost/~user/hello.php -- this still does depend on how your apache is set up (ie. it may not be set up to allow ~username forwarding/shortcut to user directories). Oh and by the way you might also need to place the file in the home/USERNAME/public_html/ directory.