balea17 Posted July 10, 2012 Posted July 10, 2012 Hey guys, I just tried to install ezRPG again, works great like always. There's only one thing that's really bugging me and which I can't really comprehend at the moment. When I click on the admin button I get the following message: Error: DbException! File: D:\xampp\htdocs\ezrpg\lib\class.dbfactory.php Line: 52 Could not find driver: Stack Trace: #0 D:\xampp\htdocs\ezrpg\init.php(31): DbFactory::factory(NULL, NULL, NULL, NULL, NULL) #1 D:\xampp\htdocs\ezrpg\admin\index.php(4): require_once('D:\xampp\htdocs...') #2 {main} Tried to fix it and can't figure out what I'm missing here.. never had this happen before. It only happens when I try to visit the admin panel, everything else works as intended so far. A little pointer in the right direction to fixing this error would be very appreciated. Quote
rulerofzu Posted July 10, 2012 Posted July 10, 2012 Ill grab a copy of xampp and install. Will let you know asap. Quote
balea17 Posted July 11, 2012 Author Posted July 11, 2012 Hm, okay. Never had this happen before though. Thanks for your help, appreciated! :D Quote
JakeB Posted July 13, 2012 Posted July 13, 2012 What version of ezRPG are you using? This was a problem in ezRPG v1.0.1, it should have been fixed in 1.0.2 Quote
rulerofzu Posted July 13, 2012 Posted July 13, 2012 Ive tried it with 1.0.2 on xampp got the same problem. Tried it with wamp and on a server didnt have the issue so its a xampp issue Quote
JakeB Posted July 13, 2012 Posted July 13, 2012 That's odd because i had that problem before, but I was pretty sure I fixed it in 1.0.2, because it works fine on xampp for me :\ I'll have to look into it more. Are you using the latest version of xampp? Quote
JakeB Posted July 13, 2012 Posted July 13, 2012 Replace your init.php with the following if you use xampp: <?php //This page cannot be viewed, it must be included defined('IN_EZRPG') or exit; //Start Session session_start(); //Headers //header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 //header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past //Show errors? //Constants define('CUR_DIR', realpath(dirname(__FILE__))); define('MOD_DIR', CUR_DIR . '/modules'); define('ADMIN_DIR', CUR_DIR . '/admin'); define('LIB_DIR', CUR_DIR . '/lib'); define('EXT_DIR', LIB_DIR . '/ext'); define('HOOKS_DIR', CUR_DIR . '/hooks'); require_once CUR_DIR.'/config.php'; (SHOW_ERRORS == 0)?error_reporting(0):error_reporting(E_ALL); require_once(CUR_DIR . '/lib.php'); //Database try { $db = DbFactory::factory($config_driver, $config_server, $config_username, $config_password, $config_dbname); } catch (DbException $e) { $e->__toString(); } //Database password no longer needed, unset variable unset($config_password); //HTML Purifier Config $purifier_config = HTMLPurifier_Config::createDefault(); $purifier_config->set('HTML.Allowed', 'b,a[href],i,br,em,strong,ul,li'); $purifier_config->set('URI.Base', $_SERVER['DOCUMENT_ROOT']); $purifier_config->set('URI.MakeAbsolute', true); $purifier_config->set('URI.DisableExternal', true); $purifier = new HTMLPurifier($purifier_config); //Smarty $tpl = new Smarty(); $tpl->template_dir = CUR_DIR . '/smarty/templates/'; $tpl->compile_dir = CUR_DIR . '/smarty/templates_c/'; $tpl->config_dir = CUR_DIR . '/smarty/configs/'; $tpl->cache_dir = CUR_DIR . '/smarty/cache/'; //Initialize $player $player = 0; //Create a hooks object $hooks = new Hooks($db, $tpl, $player); //Include all hook files $hook_files = scandir(HOOKS_DIR); foreach($hook_files as $hook_file) { $path_parts = pathinfo(HOOKS_DIR . '/' . $hook_file); if ($path_parts['extension'] == 'php' && $path_parts['basename'] != 'index.php') include_once (HOOKS_DIR . '/' . $hook_file); } //Run login hooks on player variable $player = $hooks->run_hooks('player', 0); ?> Quote
Spudinski Posted July 14, 2012 Posted July 14, 2012 I'd like to know the solution, if anyone has one. Also, a var_dump($_ENV, $_SERVER)/ Quote
JakeB Posted July 17, 2012 Posted July 17, 2012 Read the post above yours spud. For some reason zeggy just did include config.php even though init.php is being included from a different directory (so some configurations of php were trying to load ezrpg/admin/config.php), so i fixed it by using the CUR_DIR constant in the include path. Quote
Helari Posted August 5, 2012 Posted August 5, 2012 yeh i guess its fixable...and probably booher did fix it but...i remember that i quit using Xampp after i had that problem...didnt realize the problem. So i downloaded another wamp similiar things and it worked well on those. Atm im using Ampps and i dont have that problem. Its probably how Xampp reads ezrpg code probably. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.