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.

Some PHP extension warning (not loaded)

Discussion in 'General Discussion' started by xrvel, Jun 26, 2015.

  1. xrvel

    xrvel Member

    Joined:
    Oct 25, 2014
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    In my "error_log", i have this line

    Code:
    [26-Jun-2015 06:21:03 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
    
    However in "phpinfo" page, the "mysqli" is loaded, although the "mysqli.so" is located on :
    Code:
    root@xxx [/]# find / -name 'mysqli.so'
    /usr/lib64/php/modules/mysqli.so
    /home/virtfs/USER1/usr/lib64/php/modules/mysqli.so
    /home/virtfs/USER2/usr/lib64/php/modules/mysqli.so
    /home/virtfs/USER3/usr/lib64/php/modules/mysqli.so
    
    Here is my php.ini
    Code:
    root@xxx [/usr/local/lib/php/extensions/no-debug-non-zts-20100525]# grep extension /usr/local/lib/php.ini
    ; dynamically loaded extension (either a PHP extension or a Zend extension),
    ; you may only use these constants *after* the line that loads the extension.
    ; leading '/'. You must also specify the file extension being used including
    ; Directory in which the loadable extensions (modules) reside.
    ;extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525"
    extension="xcache.so"
    ; If you wish to have an extension loaded automatically, use the following
    extension = "pdo.so"
    extension = "pdo_sqlite.so"
    extension = "pdo_mysql.so"
    ; needs to go here.  Specify the location of the extension with the
    ; extension_dir directive above.
    ; dictionary files.  Include the base filename, but not the file extension.
    extension=mysqli.so
    ;extension=apc.so
    extension = xcache.so
    ; extension = php_xcache.dll
    extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcache.so"
    ; If you use a full path to the extension you insulate yourself from the
    ; extension directory changing if you change PHP installations or versions.
    ; active configuration's extension directory.
    ;extension = "newrelic.so"
    
    Code:
    root@xxx [/usr/local/lib/php/extensions/no-debug-non-zts-20100525]# ls -la
    total 2832
    drwxr-xr-x. 2 root root   4096 Jun  4 02:05 ./
    drwxr-xr-x. 3 root root   4096 Jan 16 23:48 ../
    -rwxr-xr-x  1 root root 803435 Jan 18 05:03 apc.so*
    -rwxr-xr-x  1 root root 259128 Mar 21 07:57 memcache.so*
    lrwxrwxrwx  1 root root     53 Jun  4 02:05 newrelic.so -> /usr/lib/newrelic-php5/agent/x64/newrelic-20100525.so*
    -rwxr-xr-x  1 root root  35178 Jan 22 00:58 pdo_mysql.so*
    -rwxr-xr-x  1 root root 120383 Jan 22 00:58 pdo.so*
    -rwxr-xr-x  1 root root 963929 Jan 22 00:58 pdo_sqlite.so*
    -rwxr-xr-x  1 root root 696020 Jan 22 00:53 xcache.so*
    
    I have tried to copy from
    /usr/lib64/php/modules/mysqli.so
    to
    /usr/local/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so

    But now i have new error
    Code:
    [26-Jun-2015 07:00:01 UTC] PHP Warning:  PHP Startup: mysqli: Unable to initialize module
    Module compiled with module API=20090626
    PHP    compiled with module API=20100525
    These options need to match
     in Unknown on line 0
    
    Any help is appreciated.
     
    #1 xrvel, Jun 26, 2015
    Last edited: Jun 26, 2015
  2. xrvel

    xrvel Member

    Joined:
    Oct 25, 2014
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I have tried to rebuild PHP using easy apache.
    I checked "MySQL "Improved" extension".
    After done, i restarted the Apache.

    Still same error although i can see mysqli in phpinfo
    Code:
    [26-Jun-2015 07:28:04 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Loaded modules :
    Code:
    root@xxx [/]# php -m
    [PHP Modules]
    bcmath
    calendar
    Core
    ctype
    curl
    date
    dom
    ereg
    filter
    ftp
    gd
    hash
    iconv
    imap
    json
    libxml
    mbstring
    mcrypt
    memcache
    mysql
    mysqli
    mysqlnd
    openssl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    Reflection
    session
    SimpleXML
    sockets
    SPL
    sqlite3
    standard
    tokenizer
    XCache
    XCache Cacher
    xml
    xmlreader
    xmlwriter
    zlib
    
    [Zend Modules]
    XCache
    XCache Cacher
    
    
    Code:
    root@xxx [/usr/local/lib/php/extensions/no-debug-non-zts-20100525]# ls -la
    total 3000
    drwxr-xr-x. 2 root root    4096 Jun 26 03:29 ./
    drwxr-xr-x. 3 root root    4096 Jan 16 23:48 ../
    -rwxr-xr-x  1 root root  803435 Jan 18 05:03 apc.so*
    -rwxr-xr-x  1 root root  259128 Mar 21 07:57 memcache.so*
    lrwxrwxrwx  1 root root      53 Jun  4 02:05 newrelic.so -> /usr/lib/newrelic-php5/agent/x64/newrelic-20100525.so*
    -rwxr-xr-x  1 root root   35178 Jun 26 03:15 pdo_mysql.so*
    -rwxr-xr-x  1 root root  120383 Jun 26 03:15 pdo.so*
    -rwxr-xr-x  1 root root 1129547 Jun 26 03:15 pdo_sqlite.so*
    -rwxr-xr-x  1 root root  698180 Jun 26 03:10 xcache.so*
    
    My php.ini :
    Code:
    grep extension /usr/local/lib/php.ini
    ; dynamically loaded extension (either a PHP extension or a Zend extension),
    ; you may only use these constants *after* the line that loads the extension.
    ; leading '/'. You must also specify the file extension being used including
    ; Directory in which the loadable extensions (modules) reside.
    ;extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525"
    extension="xcache.so"
    ; If you wish to have an extension loaded automatically, use the following
    extension = "pdo.so"
    extension = "pdo_sqlite.so"
    extension = "pdo_mysql.so"
    ; needs to go here.  Specify the location of the extension with the
    ; extension_dir directive above.
    ; dictionary files.  Include the base filename, but not the file extension.
    extension=mysqli.so
    ;extension=apc.so
    ; extension = php_xcache.dll
    extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcache.so"
    ; If you use a full path to the extension you insulate yourself from the
    ; extension directory changing if you change PHP installations or versions.
    ; active configuration's extension directory.
    ;extension = "newrelic.so"
    
    Mysqli.so location :
    Code:
    root@xxx [/]# find -name 'mysqli.so'
    ./usr/lib64/php/modules/mysqli.so
    ./home/virtfs/USER1/usr/lib64/php/modules/mysqli.so
    ./home/virtfs/USER2/usr/lib64/php/modules/mysqli.so
    ./home/virtfs/USER3/usr/lib64/php/modules/mysqli.so
     
    #2 xrvel, Jun 26, 2015
    Last edited: Jun 26, 2015
  3. xrvel

    xrvel Member

    Joined:
    Oct 25, 2014
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You should ensure there's not another php.ini file within the account that's utilized instead of /usr/local/lib/php.ini. That's often the cause of this issue. Commenting out the mysqli.so entry disables MySQLi for PHP.

    Thank you.
     
Loading...

Share This Page