Announcement

Collapse
No announcement yet.

PHP mysql extension problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP mysql extension problem

    Hello. I have CloudLinux 9.5 and I can't find mysql php7* extension. There is no `mysql.so` file in `/opt/alt/php7*/usr/lib64/php/modules/` folders. When I'm trying to install alt-php7*-mysql package I receive an error in configuration step:
    Code:
    yum reinstall alt-php73-mysql
    This system is receiving updates from CloudLinux Network server.
    Last metadata expiration check: 3:14:33 ago on Thu Apr  3 05:48:10 2025.
    Dependencies resolved.
    =============================================================================================================================================================================================================================================================================
     Package                                                               Architecture                                            Version                                                     Repository                                                                   Size
    =============================================================================================================================================================================================================================================================================
    Reinstalling:
     alt-php73-mysql-meta                                                  noarch                                                  3-12.el9                                                    cloudlinux-x86_64-server-9                                                   11 k
    
    Transaction Summary
    =============================================================================================================================================================================================================================================================================
    
    Total download size: 11 k
    Installed size: 129  
    Is this ok [y/N]: y​
    ​Downloading Packages:
    alt-php73-mysql-meta-3-12.el9.noarch.rpm 19 kB/s | 11 kB 00:00
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total 19 kB/s | 11 kB 00:00
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
    Preparing : 1/1
    Running scriptlet: alt-php73-mysql-meta-3-12.el9.noarch 1/2
    Reinstalling : alt-php73-mysql-meta-3-12.el9.noarch 1/2
    Cleanup : alt-php73-mysql-meta-3-12.el9.noarch 2/2
    Running scriptlet: alt-php73-mysql-meta-3-12.el9.noarch 2/2
    ERROR : alt-php73 reconfiguration is failed
    
    Verifying : alt-php73-mysql-meta-3-12.el9.noarch 1/2
    Verifying : alt-php73-mysql-meta-3-12.el9.noarch 2/2
    
    Reinstalled:
    alt-php73-mysql-meta-3-12.el9.noarch
    
    Complete!​​
    Help me, please, to resolve this problem!

  • #2
    Hello,

    I just tried reproducing this issue on a test server and did not got an error you have. Please try clearing yum cache and try again. Here is the content of modules directory on CL9 server with cPanel:

    Code:
    # ls -la /opt/alt/php73/usr/lib64/php/modules/ | grep mysql
    lrwxrwxrwx 1 root root 37 Aug 12 2024 mysqli.so -> /opt/alt/php73/etc/mysql8.0/mysqli.so
    -rwxr-xr-x 1 root linksafe 267216 Feb 26 05:30 mysqlnd.so
    -rwxr-xr-x 1 root linksafe 150808 Feb 26 05:30 nd_mysqli.so
    -rwxr-xr-x 1 root linksafe 37072 Feb 26 05:30 nd_pdo_mysql.so
    lrwxrwxrwx 1 root root 40 Aug 12 2024 pdo_mysql.so -> /opt/alt/php73/etc/mysql8.0/pdo_mysql.so


    Please also pay attention alt-php73-mysql8.0 package provides mysqli extensions only:
    Code:
    # rpm -ql alt-php73-mysql8.0-7.3.33-8.el9.x86_64
    /opt/alt/php73/etc/mysql8.0/mysqli.so
    /opt/alt/php73/etc/mysql8.0/pdo_mysql.so​

    Comment


    • #3
      There was no yum cache. I have created 2 symlinks for mysql.so and pdo_mysql.so . Now the folder looks like:
      Code:
      ls -la /opt/alt/php73/usr/lib64/php/modules/ | grep mysql
      lrwxrwxrwx  1 root root           37 Apr  3 11:25 mysqli.so -> /opt/alt/php73/etc/mysql8.0/mysqli.so
      -rwxr-xr-x  1 root linksafe   267216 Feb 26 06:30 mysqlnd.so
      -rwxr-xr-x  1 root linksafe   150808 Feb 26 06:30 nd_mysqli.so
      -rwxr-xr-x  1 root linksafe    37072 Feb 26 06:30 nd_pdo_mysql.so
      lrwxrwxrwx  1 root root           40 Apr  3 11:25 pdo_mysql.so -> /opt/alt/php73/etc/mysql8.0/pdo_mysql.so​
      but anyway I can't see mysql and pdo_mysql extensions in PHP selector. Maybe you can help how to install them manually (in that way like they will appear in PHP selector). Thanks in advance.

      Comment


      • #4
        There are no needs in mysql.so since PHP 7.1 , the mysqlnd.so is in charge, please check https://cloudlinux.zendesk.com/hc/en...QL-ND-vs-MySQL for more details.

        Comment

        Working...
        X