Find the answer to your Linux question:
Results 1 to 10 of 10
I am totally confused when it comes to installing php 5 with apache 2.2. I know how to install an rpm, but php comes as a tarball. I dont know ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    5

    Php


    I am totally confused when it comes to installing php 5 with apache 2.2. I know how to install an rpm, but php comes as a tarball. I dont know where to extract it to, and what files to edit to get it to work.

    Can somebody write up a quick tutorial or point me to something better than php.net?

  2. #2
    Just Joined!
    Join Date
    Sep 2008
    Posts
    20
    which distro are you using?
    you may want to type simply yum install php

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    5
    PCLinux 07.

    Searching has turned up nothing, it's all about starting from scratch with no apache and no php.

  4. #4
    Just Joined!
    Join Date
    Sep 2008
    Posts
    20
    you want to start from scratch, so you need to compile the PHP
    something like extract the tar, then run:

    ./configure
    make
    make install

    you can run ./configure --help to see more options.
    you may see many errors on screen, please fix them top-down one by one

  5. #5
    Just Joined!
    Join Date
    Sep 2008
    Posts
    5
    k so copy the tarball to where, after extracting cd to the dir it extracted to and do ./configure.. make and make install? Dont i have to edit httpd.conf

  6. #6
    Just Joined!
    Join Date
    Sep 2008
    Posts
    20
    yeah, you right. you need to edit your httpd.conf
    It's something like:

    LoadModule php5_module /usr/local/lib/php/libphp5.so # edit the right path
    <IfModule mod_php5.c>
    AddType application/x-httpd-php .php .phtml .php3
    AddType application/x-httpd-php-source .phps
    </IfModule>

  7. #7
    Just Joined!
    Join Date
    Sep 2008
    Posts
    5
    So it doesnt matter where i extract the tarball to? Just run the make on it? How do I know what the path is that it installs to?

    Thanks in advance for your help!

  8. #8
    Just Joined!
    Join Date
    Sep 2008
    Posts
    20
    If you're also compiling httpd from scratch, you may want to follow this:
    PHP: Apache 2.0 on Unix systems - Manual

    good luck!!!

  9. #9
    Just Joined!
    Join Date
    Sep 2008
    Posts
    5
    HTTPD is already working, so is sql. i need to know how to get php to work under these circumstances.

    Thanks!

  10. #10
    Linux Newbie
    Join Date
    Apr 2008
    Location
    India
    Posts
    170
    hey,

    just a manual compilation of php with all your modules you require in php thats it compile the php restart the httpd all set

    sample include modules such as
    ./configure \
    --with-apxs=/usr/local/apache/bin/apxs \
    --disable-debug \
    --enable-ftp \
    --enable-inline-optimization \
    --enable-magic-quotes \
    --enable-mbstring \
    ..............................................
    Regards
    David Anand
    -->Success is the list of failures ...!!!

Posting Permissions

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