assasinkilla Posted December 23, 2007 Share Posted December 23, 2007 <? // database param define('DB_TYPE', 'mysql'); define('DB_SERVER', 'localhost'); define('DB_USER', 'mything'); define('DB_PASSWORD', 'mypass'); define('DB_DATABASE', 'myspace'); // set define('HOMEPAGE','http://web.web); define('SITENAME','Myspace Codes'); define('SHOWPIMP','ON'); //ON or OFF show left-top define('ROOT_DIR', 'http://www.whateverlifs.com'); // Real path to your index page define('MP3FLASHLIST_DIR',ROOT_DIR.'/uploads/playlist'); //You do not need to change anything below this line. $mysql_server = DB_SERVER; $mysql_user = DB_USER; $mysql_pass = DB_PASSWORD; $mysql_db = DB_DATABASE; $strDBServer = $mysql_server; $strDBUser = $mysql_user; $strDBPass = $mysql_pass; $strDBName = $mysql_db; $strPath = $site_url; $site_name = SITENAME; $site_url = HOMEPAGE; $strFPID = "196180083"; $strFPName = "ME"; $strFPAge = "29"; $strFPQuote = "ADD ME!"; $strFPImage = "http://www.timeaction.com/img/me.gif"; ?> And <? include_once(ROOT_DIR."/include/adodb/adodb.inc.php"); $db = ADONewConnection(DB_TYPE); $db->Connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE); ?> Why error?! :S Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/ Share on other sites More sharing options...
PHP_PhREEEk Posted December 23, 2007 Share Posted December 23, 2007 Ok, we give up... what's the error? PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421688 Share on other sites More sharing options...
assasinkilla Posted December 23, 2007 Author Share Posted December 23, 2007 Fatal error: Call to undefined function: adonewconnection() in /home2/wwwpimp/public_html/include/db.php on line 4 db.php is the second one. Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421695 Share on other sites More sharing options...
PHP_PhREEEk Posted December 23, 2007 Share Posted December 23, 2007 My guess is that the include of adodb.inc.php is failing, which probably contains that function. Have you checked the path for that file? PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421696 Share on other sites More sharing options...
assasinkilla Posted December 23, 2007 Author Share Posted December 23, 2007 In ftp appears that is in "/public_html/include" All files are correct. Except config, me, by accident deleted config.php, so i modified the all one. But i can't see why its failing Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421699 Share on other sites More sharing options...
PHP_PhREEEk Posted December 23, 2007 Share Posted December 23, 2007 Try this in db.php <?php include_once(ROOT_DIR."/include/adodb.inc.php"); $db = ADONewConnection(DB_TYPE); $db->Connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE); ?> PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421702 Share on other sites More sharing options...
assasinkilla Posted December 23, 2007 Author Share Posted December 23, 2007 Same error :S. I edited my last post check it. I just deleted config.php so the problem is there. Btw, how i check if it's connecting good to database? Maybe that's the problem. Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421706 Share on other sites More sharing options...
Daukan Posted December 23, 2007 Share Posted December 23, 2007 ROOT_DIR be a file path not a url Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421707 Share on other sites More sharing options...
PHP_PhREEEk Posted December 23, 2007 Share Posted December 23, 2007 That's just most likely going to be: define('ROOT_DIR', '/'); // Real path to your index page or define('ROOT_DIR', '/home/your_username/public_html/'); // Real path to your index page PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421708 Share on other sites More sharing options...
assasinkilla Posted December 23, 2007 Author Share Posted December 23, 2007 I typed this: define('ROOT_DIR', '/home2/myuser/public_html); // Real path to your index page But still doesnt works, more errors. Parse error: syntax error, unexpected T_STRING in /home2/wwwpimp/public_html/config.php on line 16 Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421711 Share on other sites More sharing options...
PHP_PhREEEk Posted December 23, 2007 Share Posted December 23, 2007 We may be here awhile at this rate... = D You forgot the closing quote. You might also need a trailing slash, so try both define('ROOT_DIR', '/home2/myuser/public_html'); // Real path to your index page or define('ROOT_DIR', '/home2/myuser/public_html/'); // Real path to your index page PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421713 Share on other sites More sharing options...
assasinkilla Posted December 23, 2007 Author Share Posted December 23, 2007 Worked man THANKS! Php freaks OWNZ And, wtf when you guys replioed me in 5 mins, i was like wtf? xD. Nice very nice. Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421715 Share on other sites More sharing options...
PHP_PhREEEk Posted December 23, 2007 Share Posted December 23, 2007 No extra charge, either... can't beat that! Care for some fries with that? = ^) seeya... PhREEEk Quote Link to comment https://forums.phpfreaks.com/topic/82918-solved-what-is-wrong-with-this-code/#findComment-421717 Share on other sites More sharing options...
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.