telsiin Posted May 26, 2008 Share Posted May 26, 2008 This is a piece of code from RPG WEB profiler \tarlen\profiler\public_profiler\register.php http://lordofansalon.no-ip.org/tarlen/profiler/public_profiler/index.php for testing Now I don't believe there is anything wrong with this code as the whole application is available free from http://sourceforge.net/project/showfiles.php?group_id=167472 But I have a few question 1 what is the purpose of "->" 2 what setting on my computer could be causing this error // Check to see if the profile name already exists. $_r = $rpgDB->query(sprintf("SELECT COUNT(pname) as cnt FROM '%s' WHERE pname = '%s'", $TABLE_USERS, addslashes($user))); if (!$_r) //line 82// __printFatalErr("Failed to query database.", __LINE__, __FILE__); $r = $rpgDB->fetch_row($_r); if ($r['cnt'] != 0)quote] As alway thank you for your help Antonio Link to comment https://forums.phpfreaks.com/topic/107364-trouble-shooting-failed-to-query-database-online-82/ Share on other sites More sharing options...
telsiin Posted May 28, 2008 Author Share Posted May 28, 2008 I found the source code that causing the query to fail in page db.php The file that I need is system.php which has the Database connection information However I can't the require_once function to work correctly The file is located in <Directory "/home/tarlen/profiler/root_profiler/system.php> and is being call from <Directory "/home/tarlen/profiler/root_profiler/engine/db.php> I have also try to use an alias but it still didn't work Alias /profile "/home/tarlen/profiler/root_profiler" <Directory "/home/tarlen/profiler/root_profiler"> AllowOverride All Order allow,deny Allow from all </Directory> <?php // db.php // Opens a connection to the database. if (defined('_DB_INCLUDED_')) return; define ('_DB_INCLUDED_', true, true); require_once(dirname(__FILE__) . '/../system.php'); require_once(dirname(__FILE__) . '/../error.php'); //require_once "/profile/system.php"; //require_once "/profile/error.php"; Please Advise Thank you Link to comment https://forums.phpfreaks.com/topic/107364-trouble-shooting-failed-to-query-database-online-82/#findComment-551366 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.