Warning: MySQL extension needs to be loaded for OpenCart to work

被刻印的时光 ゝ 提交于 2019-12-12 01:53:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!