Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Weird install errors...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
dirtdrgn
Smarty n00b


Joined: 05 Nov 2003
Posts: 3

PostPosted: Wed Nov 05, 2003 11:44 pm    Post subject: Weird install errors... Reply with quote

I continually get errors such as:
Fatal error: Call to undefined function: assign() in /somewhere/index.php on line 14
No matter what functions I use, it gives me the same error.

index.php:
<?php
require_once('/somewhere/include/meta.php');

if ($action="") {
$action = "main";
}

$smart->assign('date',date("l, F j Y"));

/* if(file_exists("{$action}.tpl")) {
$smart->display('{$action}.tpl');
}
else { */
$smart->display('index.tpl');
// }
?>

meta.php
<?php
// Template System Require
define('SMARTY_DIR','/somewhere/smarty/');
require('/somewhere/smarty/Smarty.class.php');

$smart = new Smarty;
$smart = $use_sub_dirs = false;
$smart = $caching = false;
$smart->template_dir = '/somewhere/smarty/templates';
$smart->compile_dir = '/somewhere/smarty/templates_c';
$smart->config_dir = '/somewhere/smarty/configs';
$smart->cache_dir = '/somewhere/smarty/cache';

$smart->left_delimiter = '<{';
$smart->right_delimiter = '}>';
$smart->compile_check = true;
$smart->debugging = true;
print_r($smart);

function query ($string) {
if ($result[$string]=="") {
$result[$string] = mysql_query($string);
}
$retval = mysql_fetch_array($result[$string]);
return $retval;
}
?>

(Somewhere is just cutting out private location info.)
If there's anything I forgot to post, just ask me for it. Oh yeah, safe mode is on.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Nov 06, 2003 12:51 am    Post subject: Reply with quote

I think these two lines are clobbering your smarty instance Smile

$smart = $use_sub_dirs = false;
$smart = $caching = false;

should be:

$smart->use_sub_dirs = false;
$smart->caching = false;

HTH
Back to top
View user's profile Send private message
dirtdrgn
Smarty n00b


Joined: 05 Nov 2003
Posts: 3

PostPosted: Thu Nov 06, 2003 1:13 am    Post subject: Reply with quote

Whoops! Lemme fix that...

I'm such a dummy...thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP