The mysqli extension is missing. Please check your PHP configuration

前端 未结 14 1535
盖世英雄少女心
盖世英雄少女心 2020-12-01 21:45

I have looked through all of the forums that I could find relevant to this question and my problem yet nothing works. I have apache2.2 with php5, phpMyAdmin, and MySQL. I ha

相关标签:
14条回答
  • 2020-12-01 21:54

    This article can help you Configuring PHP with MySQL for Apache 2 or IIS in Windows. Look at the section "Configure PHP and MySQL under Apache 2", point 3:

    extension_dir = "c:\php\extensions"      ; FOR PHP 4 ONLY 
    extension_dir = "c:\php\ext"             ; FOR PHP 5 ONLY
    

    You must uncomment extension_dir param line and set it to absolute path to the PHP extensions directory.

    0 讨论(0)
  • 2020-12-01 21:56

    I know this is a while ago but I encountered this and followed the other answers here but to no avail, I found the solution via this question (Stackoverflow Question)

    Essentially just needed to edit the php.ini file (mine was found at c:\xampp\php\php.ini) and uncomment these lines...

    ;extension=php_mysql.dll
    ;extension=php_mysqli.dll
    ;extension=php_pdo_mysql.dll
    

    After restarting apache all was working as expected.

    0 讨论(0)
  • 2020-12-01 21:58
    1. Find out which php.ini is used.
    2. In file php.ini this line:

      extension=mysqli
      
    3. Replace by:

      extension="C:\php\ext\php_mysqli.dll"
      
    4. Restart apache
    0 讨论(0)
  • 2020-12-01 21:58

    I simply copied my php_myslqli.dll file from ert folder back to php folder, and it worked for me after restarting my Apache and MySQL from the control Panel

    0 讨论(0)
  • 2020-12-01 21:59

    Copy libmysql.dll from the PHP installation folder to the windows folder.

    0 讨论(0)
  • 2020-12-01 22:06

    In my case, I had a similar issue after full installation of Debian 10.

    Commandline: php -v show I am using php7.4 but print phpinfo() gives me php7.3

    Solution: Disable php7.3 Enable php7.4

       $ a2dismod php7.3
        
       $ a2enmod php7.4
        
       $ update-alternatives --set php /usr/bin/php7.4
       $ update-alternatives --set phar /usr/bin/phar7.4
       $ update-alternatives --set phar.phar /usr/bin/phar.phar7.4
       $ update-alternatives --set phpize /usr/bin/phpize7.4
       $ update-alternatives --set php-config /usr/bin/php-config7.4
    
    0 讨论(0)
提交回复
热议问题