fullyloaded Posted November 17, 2006 Share Posted November 17, 2006 hii have this site im trying to install but keep getting this error i tryed and did everything it asked me too but still nothing i even added the database info still nothing here is the error and the line on code im getting it on thanks...[code]Fatal error: Undefined class name 'sconfig' in /home/singlesm/public_html/utube/include/config.php on line 39[/code][code]$DBTYPE = 'mysql';$DBHOST = SConfig::get("Database", "host");$DBUSER = SConfig::get("Database", "user_name");$DBPASSWORD = SConfig::get("Database", "password");$DBNAME = SConfig::get("Database", "db_name");[/code] Link to comment https://forums.phpfreaks.com/topic/27530-help-please/ Share on other sites More sharing options...
Seraskier Posted November 17, 2006 Share Posted November 17, 2006 try using this..[code]<?php//config fileob_start();session_start();//database info$_db_host = 'database_host';$_db_user = 'database_username';$_db_pass = 'database_password';$_db_name = 'database_name';//end db info//connect to dbmysql_connect($_db_host, $_db_user, $_db_pass) or die('Could not connect: ' . mysql_error());mysql_select_db($_db_name) or die('Could not select database');//end connect?>[/code]Also just put it in a new page called "connect.php" and then at the top of every page put in:[code]<?php include("connect.php"); ?>[/code]That should do it. Link to comment https://forums.phpfreaks.com/topic/27530-help-please/#findComment-125868 Share on other sites More sharing options...
nick89 Posted November 17, 2006 Share Posted November 17, 2006 Make sure you are including or requiring the SConfig class at some point. Link to comment https://forums.phpfreaks.com/topic/27530-help-please/#findComment-125904 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.