TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 117
  • Total: 117

Can anyone figure this out?

Started by Wartog, August 05, 2006, 11:13:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Wartog

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';
    }
}    
?>

Crip

Check permissions and make sure of correct paths.. does the database connect?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes




Wartog

I got it to work i think however it loads a blank screen

Wartog

Its does require pear, I dont know what that is or how to tell if i have it.

IchBin

You can see if you have pear installed with PHP by open up a php page with this info in it.


<?php
phpinfo
();
?>


This website is proudly hosted on Crocweb Cloud Website Hosting.