Compile php

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Manuel_
    Banned
    • May 2005
    • 120

    Compile php

    First you need to check whether php is compiled or not.

    # php -m

    Above command will provide you installed version of php. If you want to upgrade it then you need to download the source from the URL:

    PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.


    or use try the below mentioned steps:

    # cd /usr/src

    # wget http://museum.php.net/php4/php-4.3.3.tar.gz

    # tar -zxvf php-4.3.3.tar.gz

    # cd /usr/src/php-4.3.3

    # ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql

    Note: A '/usr/local/apache/bin/apxs' the path of this apache extension binary may not be the same you need to set it as per your server configuration.
    You can add other prefix and options for php extension like GD and other while compiling it.

    # make

    # make test

    # make install

    You need to make some changes to work php with Apache, hence need to change the httpd.conf apache configuration file. Open this file with vi editor in insert mode.

    If LoadModule php4_module modules/libphp4.so line is not added by php install to httpd.conf, then you have to add it yourself. Add it somewhere below section named "Dynamic Shared Object (DSO) Support"

    LoadModule php4_module modules/libphp4.so

    Now, add this line to httpd.conf file:

    AddType application/x-httpd-php .php

    Lastly restart your apache server.

    Now create a test PHP file using any text editor and add these lines to it:
    Last edited by admin; 08-05-2015, 05:34 AM.
  • linux7802
    Junior Member
    • Dec 2009
    • 16

    #2
    AccuWeb.Cloud
    Re: Compile php

    Its great if you also provide us steps to compile php with both veriosn php4 and php5 it will be great help

    Comment

    Working...
    X