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.

easyapache custom php flags

Discussion in 'EasyApache' started by stormridermay, Jul 11, 2007.

  1. stormridermay

    stormridermay Member

    Joined:
    May 24, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I would like to add mssql support to php but still use easyapache. I have found this doc ( http://www.cpanel.net/support/docs/easyapache.htm ) that tells how to add a custom compile flag.

    So i created /var/cpanel/easy/apache/rawopts/all_php5 with the following content:

    with-mssql=/usr/local/freetds

    I have already installed freetds.

    When i run apache update everything seens to run ok but php is compiled without this flag.

    Could someone tell me what i'm doing wrong?

    Thanks.
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    That document is for the easyapache in EDGE.

    For easyapache in no-EDGE branches, set the FULL_CUSTOM_PHP_FLAGS or CUSTOM_PHP_FLAGS environment variable before executing /scripts/easyapache
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Apologies for sounding like an idiot, but how would I do that?

    I'm looking to get the SOAP extension enabled in PHP5 and being able to set custom compile flags would be just what I need!
     
  4. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    Here's my procedure on a Cpanel 10.x box. YMMV

    Of course, you will have a different verion of PHP listed in your directory too.

    You need to have FreeTDS installed, and when you compile PHP, you need to add the freetds stuff to the configure
    line.

    After you upgrade php or Apache in cPanel/WHM you need to do this.

    cd /home/cpapachebuild/buildapache/

    (If needed) tar zxf /home/cpapachebuild/buildapache/php-4.4.2.tar.gz

    cd php-4.4.2

    make clean

    ## Old -don't use ./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath
    --enable-calendar --enable-ftp --enable-magic-quotes --with-mysql=/usr --with-mssql=/usr/local --enable-discard-
    path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib

    # Run configure to initialize the Makefile for PHP notice --with-mssql directive has been added

    ./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-cale
    ndar --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-mag
    ic-quotes --with-mysql=/usr --with-mssql=/usr/local --enable-discard-path --with-pear --enable-sockets --enable-t
    rack-vars --enable-versioning --with-zlib

    make
    make install

    /scripts/installzendopt

    ----------------------------------------------------
    Your phpinfo should display your proper config with '--with-mssql=/usr/local'
    You should also check the compile line with phpinfo and use yours to recompile php. The one above is for my server and may be different than yours.

    Chuck
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Chuck:

    You got the basic manual install sequence correct but I'd make a few tweaks ....

    I would remove the "--enable_versioning" flag in your ./configure line
    if you are going to be installing Zend Optimizer as it doesn't like it.

    After "make" and before "make install", it is good to run "make test" to
    confirm that the building of you new PHP worked and that all is happy
    before actually installing the new PHP binary.

    On that "installzendopt" line, I would make it "/scripts/installzendopt 3.2.8"
    else you will get an old version of Zend Optimizer installed.
     
  6. xbill

    xbill Member

    Joined:
    May 4, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Try adding -- before with-mssql=/usr/local/freetds
    I was added Interbase support to my php and all works fine
     
Loading...

Share This Page