Join the community today
Become a Member

PHP-FPM How to Install MongoDB PHP Extension?

Discussion in 'Centmin Mod Insights' started by RoldanLT, May 11, 2015.

Tags:
  1. RoldanLT

    RoldanLT Well-Known Member

    3,982
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    12:47 AM
    1.11
    10.2
    Can someone guide me?
    Did you try this already @eva2000
     
  2. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:47 AM
    Nginx 1.13.x
    MariaDB 5.5
    similar to installing ssh2 PHP extension PHP-FPM - Install PHP extension ssh2 | Centmin Mod Community

    However, I have a test github Centmin Mod .08 beta02 branch with working MongoDB PHP extension for fresh installs or where you downgrade/upgrade via centmin.sh menu option to a major PHP version i.e. PHP 5.4 to 5.5 or 5.6 or PHP 5.6 to 5.5 or 5.4. Minor PHP downgrade/upgrades don't trigger the PHP extension detection/auto recompile routine.

    Something release later, unfortunately busy with paid client work right now.
     
    • Like Like x 1
  3. RoldanLT

    RoldanLT Well-Known Member

    3,982
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    12:47 AM
    1.11
    10.2
    Code:
    cd /svr-setup
    wget https://github.com/mongodb/mongo-php-driver/archive/master.zip
    unzip master.zip
    cd mongo-php-driver-master/
    /usr/local/bin/phpize
    ./configure --with-php-config=/usr/local/bin/php-config
    make
    make install
    CONFIGSCANDIR='/etc/centminmod/php.d'
    touch ${CONFIGSCANDIR}/mongodb.ini
    echo "extension=mongo.so" > ${CONFIGSCANDIR}/mongodb.ini
    service php-fpm restart
    
    Done :)
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:47 AM
    Nginx 1.13.x
    MariaDB 5.5
    perfect (y)

    exactly how I would of done it manually :)
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:47 AM
    Nginx 1.13.x
    MariaDB 5.5
  6. RoldanLT

    RoldanLT Well-Known Member

    3,982
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    12:47 AM
    1.11
    10.2
    So to apply this and remove my custom install and edit.
    Delete the ${CONFIGSCANDIR}/mongodb.ini
    Then Re-Install PHP ?
     
  7. eva2000

    eva2000 Administrator Staff Member

    31,027
    6,928
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,434
    Local Time:
    2:47 AM
    Nginx 1.13.x
    MariaDB 5.5
    no need - just leave as is as your steps at PHP-FPM - How to Install MongoDB PHP Extension? | Centmin Mod Community are exactly the same as the update in code

    however, you'd want to update Centmin Mod .08 beta02 code + set in centmin.sh PHPMONGODB='y' itself so you can do reinstalls via centmin.sh menu option 5 and retain MongoDB PHP extension support
     
    Last edited: May 14, 2015
    • Agree Agree x 1