I have looked through all of the forums that I could find relevant to tướng this question and my problem yet nothing works. I have apache2.2 with php5, phpMyAdmin, and MySQL. I have uncommented the extension, I have checked my phpinfo()
and mysqli does not come up. My config directory is where it should be and it still will not load.
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
asked May 18, 2012 at 4:18
WesleyWesley
3271 gold badge4 silver badges12 bronze badges
5
- Find out which php.ini is used.
In tệp tin php.ini this line:
extension=mysqli
Replace by:
extension="C:\php\ext\php_mysqli.dll"
- Restart apache
answered Aug 31, 2018 at 21:07
AAGREDAAAGREDA
2913 silver badges2 bronze badges
3
If your configuration files are okay but still having the same issue then install php7.x-mysql according to tướng the version of the installed php.
For example in my case, I'm using php7.3 ví I ran the following command to tướng get it all set:
sudo apt install php7.3-mysql
systemctl reload apache2
answered May trăng tròn, 2020 at 22:02
3
I know this is a while ago but I encountered this and followed the other answers here but to tướng no avail, I found the solution via this question (Stackoverflow Question)
Essentially just needed to tướng edit the php.ini tệp tin (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.
answered Jul 1, 2013 at 21:11
sradforthsradforth
2,1862 gold badges23 silver badges38 bronze badges
1
In your Xampp thư mục, open
php.ini
tệp tin inside the PHP thư mục i.exampp\php\php.ini
(with a text editor).Search for
extension=mysqli
(Ctrl+F), if there are two, look for the one that has been uncommented (without ";" behind)Change the mysqli with the correct path address i.e
extension=C:\xampp\php\ext\php_mysqli.dll
.On your Xampp control panel, stop and start apache and MySQL
Sonu Sourav
3,5042 gold badges16 silver badges26 bronze badges
answered Jun 14, 2020 at 3:00
1
sudo apt-get install php7.2-mysql
extension=mysqli.ví (add this php.ini file)
sudo service apache2 restart
Please use above commands to tướng resolve mysqli-extension missing error
answered Apr 27, 2020 at 16:34
CapricornCapricorn
2713 silver badges7 bronze badges
Simply specify the directory in which the loadable extensions (modules) reside in the php.ini tệp tin from
; On windows:
extension_dir="C:\xampp\php\ext"
to
; On windows:
;extension_dir = "ext"
Then enable the extension if it was disabled by changing
;extension=mysqli
to
extension=mysqli
answered Dec 4, 2019 at 9:57
SamWanekeyaSamWanekeya
6046 silver badges11 bronze badges
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 mix it to tướng absolute path to tướng the PHP extensions directory.
answered Jun 4, 2012 at 14:13
Dmytro ZarezenkoDmytro Zarezenko
10.7k11 gold badges64 silver badges105 bronze badges
Copy libmysql.dll from the PHP installation thư mục to tướng the windows thư mục.
answered May 18, 2013 at 6:28
RM.RM.
2,02320 silver badges31 bronze badges
I've been searching for hours and no one could help mạ. I did a simple thing to tướng solve this problem. (WINDOWS 10 x64)
Follow this:
1 - Go to tướng your php_mysqli.dll path (in my case: C:/xampp/php/ext);
2 - Move the php_mysqli.dll to tướng the previous thư mục (C:/xampp/php);
3 - Open php.ini and tìm kiếm the line: "extension: php_mysqli.dll";
4 - Change to tướng the path where is your file: extension="C:\xampp\php\php_mysqli.dll";
5 - Restart your application (wampp, xampp, etc.) and start Apache Server;
The problem was the path ext/php_mysqli.dll, I've tried changing the line to tướng extension="C:\xampp\php\ext\php_mysqli.dll" but doesn't worked.
answered Sep 1, 2019 at 4:37
SpawnSpawn
585 bronze badges
I had the same problem and I solved it. You can solve it too if you follow these steps:
- you have to tướng install PHP to tướng C:/php or your current version locate it to tướng this path and specify it as a system variable
then open xampp program and click config and open php.ini and uncomment the following lines:
extension=pdo_mysql extension=pdo_mysql extension=openssl
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Mar 27, 2020 at 20:54
try to tướng change PHP version
$sudo update-alternatives --config php
if it didn't work change for example from PHP 5.6 => PHP 7.1
$ sudo a2dismod php5.6
$ sudo a2enmod php7.1
$ sudo service apache2 restart
answered Sep 19, 2022 at 10:55
I encountered this problem today and eventually I realize it was the comment on the line before the mysql dll's that was causing the problem.
This is what you should have in php.ini by mặc định for PHP 5.5.16:
;extension=php_exif.dll Must be after mbstring as it depends on it
;extension=php_mysql.dll
;extension=php_mysqli.dll
Besides removing the semi-colons, you also need to tướng delete the line of comment that came after php_exif.dll. This leaves you with
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
This solves the problem in my case.
answered Aug 27, năm trước at 5:53
I simply copied my php_myslqli.dll tệp tin from ert thư mục back to tướng php thư mục, and it worked for mạ after restarting my Apache and MySQL from the control Panel
answered Sep 23, 2019 at 14:23
Its an issue of extension directory. You need to tướng change php extension directory manually to tướng work this.
If you are using AMPP Server, vì thế the following
Goto settings -> PHP -> Configuration
in php7.3.ini Find, (Versions might change)
extension_dir = "" , (Already having some path)
and change value to tướng
extension_dir = "C:\Program Files\Ampps\php-7.3\ext"
If you are using XAMP
Goto XAMP Settings, Apache -> PHP.ini
Find, extension_dir = in php.ini, and mix path of the php extension thư mục of your local machine. See the below example.
extension_dir = "C:\php\ext" (Check your path properly)
answered Apr 25, 2020 at 3:47
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 mạ 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
answered Aug 16, 2020 at 22:39
ShapCyberShapCyber
3,6422 gold badges23 silver badges28 bronze badges
Replace
include_path=C:\Program Files (x86)\xampp\php\PEAR
with following
include_path="C:\Program Files (x86)\xampp\php\PEAR"
i.e Add commas , i checked apache error logs it was showing syntax error ví checked whole tệp tin for syntax errors.
answered Dec trăng tròn, 2020 at 22:36
Waleed MohsinWaleed Mohsin
1,1331 gold badge10 silver badges13 bronze badges
The thing that fixed my problem is: open php.ini
then add this extension=php_mysqli.dll
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Jun 8, 2021 at 8:20
for linux users
For mạ it was a weird behavior:
i went to tướng phpmyadmin directory (for mạ /usr/share/phpmyadmin
) and inside index.php
tệp tin entered phpinfo();
, then refreshed phpmyadmin trang web page;
surprisingly phpmyadmin was using different php version than thở what mix on system. sự kiện update-alternatives --config php
doesn't change situation;
so i just disabled all other php version using directly a2dismod php8.1
(and whatever version you have) command and then enabled a version via a2enmod
command.
hope help someone;
Amin.QarabaqiAmin.Qarabaqi
7131 gold badge7 silver badges20 bronze badges