Results 1 to 4 of 4

Thread: Apache + php

  1. #1

    Default Apache + php

    Hi there,

    I've got a little server here at home, and I've managed to get apache working, so I can open my HTML webpages. But when I try to open .php files, they just download to my computer. I've installed php as well as the php5_mod for apache, but apache still won't translate the .php pages to regular HTML. I think I've just missed some step somewhere, can anybody help me?

    Thanks, Superdude

  2. #2

    Default Re: Apache + php

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    So what have you done in Apache to make it work?

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php5

    Add those at least so Apache knows that .php and .php5 files are really
    PHP files and not some other type of file (text or html).

    These are in my /etc/apache2/conf.d/php5.conf file

    Good luck.






    superdude00 wrote:
    > Hi there,
    >
    > I've got a little server here at home, and I've managed to get apache
    > working, so I can open my HTML webpages. But when I try to open .php
    > files, they just download to my computer. I've installed php as well as
    > the php5_mod for apache, but apache still won't translate the .php pages
    > to regular HTML. I think I've just missed some step somewhere, can
    > anybody help me?
    >
    > Thanks, Superdude
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iQIcBAEBAgAGBQJKFtUiAAoJEF+XTK08PnB5EhEP/iYcMVQ6Zs2C1O10j5BUZyXj
    M1NsFDhIklyosxzoo9Ccr7sY6yIhM/mg0SxCdc5m/Zj7c31G6jLiTSZZ01zjPAz0
    qwTY637m0P+FPza9iZdxJRE6czwbJHCs+BVna5vMndbfGSWOsI5BQRGCkGwZHAG2
    bmVGvb27cL3OaW5W6j/Y4Vl2xZ59g8HniYtXaq6OPTpYilnuwwEs0yY+37GXSitA
    jgg7DnNF9hxSpl3i29AtvoJt/gQvLOJK9a/UGFPSAyV7M8AMzPmOo32KoJPuj65x
    f67IjNn+dgvKq+2tMHRSCjiHxmJN9EVpo0Ezdjn8QdMpP1cryk0xqix35gfjRDlh
    WyTSIigLYfo5jjaHkdTe8X6r7E/m2x12x2GcbjQ3CNcznYyKBwfuH+37/CO/CEn4
    nOeuRtAlBld+MNPDdwhlOOk3kLD20hhnKi140TNAlG8YYVfGMDPxreLWPbWElp1C
    tzOZGVHxnrC9HtSFEYeT+YjHX6JVGA2kLtBUEvREhmJ5HBQqH8Jv4e2Ve6o7NErA
    vo+wo3B3QGeM1qlzgXLwdoxB3yYbUHi2P3jiR3sMyk7cE8yfauZMgIx3+djT3nZb
    +FaSS2nQakci+KOOpbOe2GlcANzoSnOBKxUw+333uHcvd4MdAJTpjYSwEXBYXn1d
    FvlnKHNoOvSLLjhjEHNj
    =iOi7
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    May 2009
    Location
    Jakarta, Beijing
    Posts
    77

    Default Re: Apache + php

    is the module loaded at apache start time?

    Code:
    cat /etc/apache2/sysconfig.d/loadmodule.conf | grep php5
    if it isn't, you should manually add the php5 module in apache2 config file,

    /etc/sysconfig/apache2
    Code:
    APACHE_MODULES="authz_host actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir php5"
    "And just as you want men to do to you, you also do to them likewise."
    Luke 6:31 NKJV

  4. #4
    Join Date
    Sep 2008
    Location
    Czech Republic
    Posts
    14

    Default Re: Apache + php

    Try XAMPP, it's easy to install and working.

    apache friends - xampp for linux

Posting Permissions

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