The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom Patches for PHP

Discussion in 'General Discussion' started by WebIdentity, Mar 27, 2007.

  1. WebIdentity

    WebIdentity Member

    Joined:
    Mar 27, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Simple ... Don't use /scripts/easyapache to compile PHP!

    Just compile PHP yourself which is much better anyway!
     
  3. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Correct, for custom PHP/Apache patches you need to compile them from source. This requires having root shell access and knowing what you're doing to patch the source, then compile PHP with the options you need. Usually a source compile takes around and hour or so.
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    For novices ... :D

    Generally takes me about 10 to 15 minutes (mostly compile time)
     
  5. Rooter

    Rooter Well-Known Member

    Joined:
    Apr 23, 2003
    Messages:
    146
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    Root Administrator
    You can do this by adding the patch command to the following file:

    /var/cpanel/buildapache/scripts/phppost

    Note that you will probably have to create some of the directory structure for this and the phppost file itself and ensure that your custom patch is available on the system (e.g. download it via wget such as the example below).

    An example of what you could place in it:
    Code:
    #AUTO PATCH FROM http://choon.net/php-mail-header.php
    PHPVER=`find -type d -iname "php-*"|sed "s/.\///g"`
    wget http://choon.net/opensource/php/$PHPVER-mail-header.patch
    patch -p0 < $PHPVER-mail-header.patch
    The above method will only work with the current EasyApache v1 in cPanel/WHM v10; it will not work with the new EasyApache v2 in cPanel/WHM v11.
     
  6. WebIdentity

    WebIdentity Member

    Joined:
    Mar 27, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the suggestions guys

    (i know it took ages to respond, i got a little side tracked with bigger things)

    But thanks nonetheless.
     
Loading...

Share This Page