Results 1 to 7 of 7
  1. #1

    PHP installation

    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"

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

    Last edited by fahadfaraz; 04-24-2004 at 04:07 AM.

  2. #2
    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.

  3. #3

    Re: PHP installation

    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?
    Jonas Koch Bentzen

  4. #4
    Join Date
    Aug 2002
    Posts
    1,612
    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

  5. #5
    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

  6. #6
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    as superuser, execute apachectl start
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  7. #7
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •