TinyPortal

Development => Support => Topic started by: Wartog on August 05, 2006, 11:13:15 AM

Title: Can anyone figure this out?
Post 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';
   }
}    
?>
Title: Re: Can anyone figure this out?
Post by: Crip on August 05, 2006, 12:25:29 PM
Check permissions and make sure of correct paths.. does the database connect?
Title: Re: Can anyone figure this out?
Post by: Xarcell on August 05, 2006, 01:35:54 PM
pear?
Title: Re: Can anyone figure this out?
Post by: Wartog on August 05, 2006, 02:09:33 PM
I got it to work i think however it loads a blank screen
Title: Re: Can anyone figure this out?
Post by: Wartog on August 05, 2006, 02:10:09 PM
Its does require pear, I dont know what that is or how to tell if i have it.
Title: Re: Can anyone figure this out?
Post by: IchBin on August 07, 2006, 05:20:01 AM
You can see if you have pear installed with PHP by open up a php page with this info in it.


<?php
phpinfo
();
?>