Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Adding pecl extension manually issue

Discussion in 'EasyApache' started by Aleli Sanchez, Apr 6, 2018.

Tags:
  1. Aleli Sanchez

    Aleli Sanchez Member

    Joined:
    Feb 7, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Hi
    I already installed the pecl extension pdo_sqlanywhere.so and it is in this directory: /opt/cpanel/ea-php71/root/usr/lib64/php/modules/

    But php is not recognized yet, so I think that I need to add it to php.ini and restart apache, but I don´t know how to do it.

    Any one can help me to find the php.ini extensions file or any other way to activate this extension.

    PD: I needed to do it manually because the stability is beta and it was not possible through cpanel.

    Thanks
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    372
    Likes Received:
    20
    Trophy Points:
    93
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,


    Since you've been able to install it already, the following forum post may be useful for you:

    SOLVED - Pecl with EA4

    Thank you,
     
  3. Aleli Sanchez

    Aleli Sanchez Member

    Joined:
    Feb 7, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Hi

    I did all those steps, but the driver is not recognized yet. I receive this error: Attempted to call function "sasql_connect".

    The same if I try with odbc connection.

    Due the stability is beta I installed it manually, then I edited the PHP.ini with Multiphp Editor, but I received the same error.

    I have:
    Centos 6.9 with WHM/CPanel

    https://pecl.php.net/get/PDO_SQLANYWHERE-0.1.4.tgz installed here: /opt/cpanel/ea-php71/root/usr/lib64/php/modules/

    The subdomain have PHP 7.1

    I restarted Apache and FPM, too

    PDO and OBDC extensions are installed with Easy Apache 4

    What I´m missing?
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    372
    Likes Received:
    20
    Trophy Points:
    93
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello,


    It seems like you've taken the necessary steps.

    What do you see when you run

    Code:
    /opt/cpanel/ea-php71/root/usr/bin/php -m
    Do you have a pecl.ini or zzzzzzz-pecl.ini file in /opt/cpanel/ea-php71/root/etc/ which has the module listed?

    Thank you,
     
  5. Aleli Sanchez

    Aleli Sanchez Member

    Joined:
    Feb 7, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    I see this when I run /opt/cpanel/ea-php71/root/usr/bin/php -m :

    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dba
    dom
    enchant
    exif
    fileinfo
    filter
    ftp
    gd
    hash
    iconv
    intl
    json
    libxml
    mbstring
    mcrypt
    mysqli
    mysqlnd
    odbc
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    PDO_ODBC
    pdo_pgsql
    PDO_SQLANYWHERE
    pdo_sqlite
    pgsql
    Phar
    posix
    pspell
    readline
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    wddx
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    [Zend Modules]
    Zend OPcache


    In /opt/cpanel/ea-php71/root/etc/ I only have this files:
    pear
    php.d
    php-fpm.conf.rpmnew
    php-fpm.d sysconfig
    pear.conf
    php-fpm.conf
    php-fpm.conf.save
    php.ini
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    372
    Likes Received:
    20
    Trophy Points:
    93
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    I apologize that second path I gave you to check was incorrect:

    The file should be located at:
    /opt/cpanel/ea-php71/root/etc/php.d/

    Thank you,
     
  7. Aleli Sanchez

    Aleli Sanchez Member

    Joined:
    Feb 7, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Thanks

    I have this files:

    10-opcache.ini 20-iconv.ini 20-simplexml.ini 20-zip.ini
    20-bcmath.ini 20-intl.ini 20-snmp.ini 30-mysqli.ini
    20-bz2.ini 20-json.ini 20-soap.ini 30-pdo_mysql.ini
    20-calendar.ini 20-mbstring.ini 20-sockets.ini 30-pdo_odbc.ini
    20-ctype.ini 20-mcrypt.ini 20-sqlite3.ini 30-pdo_pgsql.ini
    20-curl.ini 20-mysqlnd.ini 20-sysvmsg.ini 30-pdo_sqlite.ini
    20-dba.ini 20-odbc.ini 20-sysvsem.ini 30-wddx.ini
    20-dom.ini 20-pdo.ini 20-sysvshm.ini 30-xmlreader.ini
    20-enchant.ini 20-pgsql.ini 20-tidy.ini 30-xmlrpc.ini
    20-exif.ini 20-phar.ini 20-tokenizer.ini opcache-default.blacklist
    20-fileinfo.ini 20-posix.ini 20-xml.ini zzzzzzz-pecl.ini
    20-ftp.ini 20-pspell.ini 20-xmlwriter.ini
    20-gd.ini 20-shmop.ini 20-xsl.ini

    And zzzzzzz-pecl.ini is empty.
     
  8. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    372
    Likes Received:
    20
    Trophy Points:
    93
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Aleli Sanchez

    Can you add the line

    Code:
    extension="pdo.sqlanywhere.so"
    to the zzzzzzz-pecl.ini

    and let me know if the extension is recognized?


    Thank you,
     
  9. Aleli Sanchez

    Aleli Sanchez Member

    Joined:
    Feb 7, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    Nop, may be a driver problem? Something with odbc, I´m thinking to use odbc to connect SQL Anywhere, instead of this extension, but I don´t know how to config the odbc.ini to recognize the driver for SQL Anywhere.
     
  10. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    372
    Likes Received:
    20
    Trophy Points:
    93
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    When you look at the installed php modules it does come up which leads me to believe the module is loaded and possibly the issue is configuration in nature.

    I did find several How-To articles on using ODBC to connect to SQL Anywhere when performing a search with Google which you might look into as well.
     
Loading...

Share This Page