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.

BitSet php extension

Discussion in 'General Discussion' started by NemoXP, Aug 17, 2011.

  1. NemoXP

    NemoXP Active Member

    Joined:
    Feb 25, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Constanta, Romania, Romania
    cPanel Access Level:
    Root Administrator
    Hello.
    I need to add this extension (bitset) to my php install.
    Is there any way to do this without having to re-complie entire php?

    Thanks.
    Catalin
     
    #1 NemoXP, Aug 17, 2011
    Last edited: Aug 18, 2011
  2. NemoXP

    NemoXP Active Member

    Joined:
    Feb 25, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Constanta, Romania, Romania
    cPanel Access Level:
    Root Administrator
    please, someone?
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It doesn't seem to want to build properly in PECL but I still had to use PECL to obtain the source. Here is how I got it working:

    Code:
    pecl install bitset
    This failed for me with the following error:

    Code:
    root@host [/]# pecl install bitset
    downloading bitset-1.0.tgz ...
    Starting to download bitset-1.0.tgz (12,298 bytes)
    .....done: 12,298 bytes
    5 source files, building
    running: phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module
    
    ERROR: `phpize' failed
    So, I located where it had downloaded the tarball at /root/tmp/pear/cache/bitset-1.0.tgz and copied it to root:

    Code:
    cp /root/tmp/pear/cache/bitset-1.0.tgz /root
    cd /root && tar xzf bitset-1.0.tgz
    cd bitset-1.0
    phpize
    ./configure
    make && make install
    This put the bitset.so into /usr/local/lib/php/extensions/no-debug-non-zts-20090626/bitset.so location. I then put the following into /usr/local/lib/php.ini file to load it:

    Code:
    extension = /usr/local/lib/php/extensions/no-debug-non-zts-20090626/bitset.so
    I put that under the following section:

    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
    At that point, I saved the /usr/local/lib/php.ini file and restarted Apache:

    Code:
    /etc/init.d/httpd restart
    The bitset option appears in my phpinfo pages now (screen print attached).

    Screen shot 2011-08-18 at 4.37.06 PM.png
     
  4. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just one more additions ,
    # wget -c http://pecl.php.net/get/bitset-1.0.tgz
    # tar -xzf bitset-1.0.tgz
    # cd bitset-1.0
    # phpize
    # ./configure
    # make
    # make install

    Now edit /usr/local/lib/php.ini and add the extension

    extension="bitset.so"

    Also make sure the php.ini have extension_dir configured to the correct extension folder

    Hope this will help
     
  5. NemoXP

    NemoXP Active Member

    Joined:
    Feb 25, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Constanta, Romania, Romania
    cPanel Access Level:
    Root Administrator
    great. thanks
    it is ok now.
     
Loading...

Share This Page