TinyPortal
Development => Support => Topic started by: Wartog on August 05, 2006, 11:13:15 AM
Im trying to configure a database.
I keep getting this error here is the error followed by the code.
Fatal error: Class spaces_sql: Cannot inherit from undefined class sql in /home/wartog/public_html/book/home/astrospaces/libs/spaces_setup.php on line 10
<?php
require(SPACES_DIRECTORY . 'libs/sql.lib.php');
require(SPACES_DIRECTORY . 'libs/spaces.libs.php');
require(SPACES_DIRECTORY . 'libs/Smarty.class.php');
require(SPACES_DIRECTORY . 'user_uploaded/processor.php');
require('DB.php'); // PEAR DB
// database configuration
class Spaces_SQL extends SQL {
function Spaces_SQL() {
// dbtype://user:pass@host/dbname
$dsn = "mysql://wartog_wartog:9876123@local/wartog_smf1";
$this->connect($dsn) || die('could not connect to database');
}
}
// smarty configuration
class Spaces_Smarty extends Smarty {
function Spaces_Smarty() {
$this->template_dir = SPACES_DIRECTORY . 'templates';
$this->compile_dir = SPACES_DIRECTORY . 'templates_c';
$this->config_dir = SPACES_DIRECTORY . 'configs';
$this->cache_dir = SPACES_DIRECTORY . 'cache';
}
}
?>
Check permissions and make sure of correct paths.. does the database connect?
pear?
I got it to work i think however it loads a blank screen
Its does require pear, I dont know what that is or how to tell if i have it.
You can see if you have pear installed with PHP by open up a php page with this info in it.
<?php
phpinfo();
?>