Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2007
    Posts
    5

    Default easyapache custom php flags

    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. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #3
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by cpanelkenneth View Post
    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
    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!
    Jon Cram <jon@webignition.net>
    Web and interface design http://webignition.net/
    Hosting Reborn (free cpanel accounts) http://hostingreborn.com/

  4. #4
    Member carock's Avatar
    Join Date
    Sep 2002
    Location
    St. Charles, MO
    Posts
    215

    Default

    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. #5
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    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. #6
    Member
    Join Date
    May 2005
    Posts
    5

    Default

    Quote Originally Posted by stormridermay View Post
    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.
    Try adding -- before with-mssql=/usr/local/freetds
    I was added Interbase support to my php and all works fine

Similar Threads & Tags
Similar threads

  1. Replies: 8
    Last Post: 04-30-2012, 12:30 AM
  2. Custom PHP with EasyApache
    By rhenderson in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-18-2008, 10:56 AM
  3. easyapache needs update for new flags
    By websnail.net in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-14-2007, 06:02 AM
  4. Custom configure flags on PHP
    By gnif in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-21-2007, 11:57 AM
  5. easyapache with flags
    By olliemaitland in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-03-2004, 04:07 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube