Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005

    Trouble installing php 5 [linux newb]

    First off, Im a pretty big linux newb, but Ive installed linux on my home server to learn more about linux + server administration.

    With that being said, I have installed apache (and have it working) to this directory:


    I configured php5 like this

    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs

    I then ran make ; make install.

    I restarted apache and then I made test.php and just put <?php phpinfo() ?> on it. When I go to test.php I just see the source code. Also, if I run php test.php in the terminal, I get a response that the php command cannot be found.

    I did notice that my httpd.conf has been updated with

    LoadModule php5_module modules/

    Any idea about whats going wrong?


  2. #2
    Join Date
    Feb 2003
    North Hollywood, CA
    Do it as

    /path/to/php test.php

    Also /path/to/php -i
    will do the same.
    Remote Hands and Your Local Tech for the Los Angeles area.

    (310) 573-8050 - LinkedIn

  3. #3
    Join Date
    Apr 2006
    Southern California
    Did you set apache to process .php as PHP? If you don't add that little bit, it wouldn't.
    Sarcasm, the 6th Ponyman of the Apocalypse.
    Please do not inquire about Tim, the 5th Ponyman.

  4. #4
    Join Date
    Nov 2005
    Thanks for the replies. You both were right

    I forgot to tell apache what to do with .php!

    I ran /usr/local/php/bin/php test.php and it printed the info

    One final question though, How do I get it to work by running php instead of /usr/local/.../php ?

Posting Permissions

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