问题
I have installed XAMPP on windows. Apache is running just fine on port 80 and 443, and mysql is also running on 3306. I am installing open cart 1.5 locally but on pre-installation its giving me error "Warning: MySQL extension needs to be loaded for Open Cart to work!" Mysql current settings is off. Every thing looks fine , i have searched a lot but couldn't find any thing. What should i do? My php version is PHP Version 5.5.33 and my open cart version is 1.5.4.
回答1:
Open file step_2.php under install folder comment the following line
/*
if (!extension_loaded('mysql')) {
$this->error['warning'] = 'Warning: MySQL extension needs to be loaded for OpenCart to work!';
}*/
On step 3 select MysqlI. It will work on PHP 7
Note : I know this is not a clean way, But we can use this as hack for 1.5.x versions.
回答2:
Please open following folder: xampp\php
and edit php.ini in text editor. search for extension=php_mysql.dll and then remove ; form beginning of line. turn off the MySql server and turn on back. you will be good.
来源:https://stackoverflow.com/questions/36036465/warning-mysql-extension-needs-to-be-loaded-for-opencart-to-work