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

unable to read resource in XYZ

 
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 -> Language: German
View previous topic :: View next topic  
Author Message
Schaelle
Smarty Rookie


Joined: 28 Jun 2004
Posts: 12
Location: Germany, Leipzig

PostPosted: Mon Jun 28, 2004 5:25 pm    Post subject: unable to read resource in XYZ Reply with quote

Hi, möchte Smarty nutzen bekomme aber den Fehler:
Quote:
Warning: Smarty error: unable to read resource: "index.tpl" in /www/htdocs/tawhs/v1/templates/smarty/Smarty.class.php on line 1083


Meine Daten
Version: 2.6.3
Ordnerstrukturen mit Beschreibung:
v1 - Mainordner
- acp/
- templates/
- index.php (hier wird die acp/configs/inc.cfg.php includet und das Smarty TPL-Objekt erstellt)

- acp/cfg/ -->
smarty.cfg.php - hier wird der Smartypfad angegeben und die Klasse definiert
inc.cfg.php - hier wird die smarty.cfg.php includet

- templates -->
templates/
templates_c/
smarty/

Wichtige Datein

index.php
Code:

include("acp/cfg/inc.cfg.php");      // CFG's reinladen

// Smartytest
$smarty = new Smarty;

$smarty->assign('name', 'Schaelle');
$smarty->assign('clanname', 'Das Wolfsrudel');

$smarty->display('index.tpl');


smarty.cfg.php
Code:

define('SMARTY_DIR', '/www/htdocs/tawhs/v1/templates/smarty/');
require(SMARTY_DIR.'Smarty.class.php');



Ich hoffe ihr könnt mir hefen

mfg Schaelle

P.S.: Wen noch Infos fehlen, beschid sagen die kommen dann sofort.
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Mon Jun 28, 2004 5:50 pm    Post subject: Reply with quote

Hast Du die ganzen Pfade entsprechend angepasst?
Code:
$smarty->template_dir = '/path_to/templates/';
$smarty->compile_dir = '/path_to/templates_c/';
$smarty->config_dir = '/path_to/configs/';
$smarty->cache_dir = '/path_to/cache/';
Back to top
View user's profile Send private message
Schaelle
Smarty Rookie


Joined: 28 Jun 2004
Posts: 12
Location: Germany, Leipzig

PostPosted: Mon Jun 28, 2004 7:45 pm    Post subject: Reply with quote

Nein, hatte es nach einem Externen.Tutorial gemacht, da stand das nicht, mal reinmachen und testen, danke ...
...habe jetzt:
smarty.cfg.php
Code:

define('SMARTY_DIR', '/www/htdocs/tawhs/v1/templates/smarty/');
require(SMARTY_DIR.'Smarty.class.php');

$smarty->template_dir = 'SMARTY_DIR.templates/';
$smarty->compile_dir = 'SMARTY_DIR.templates_c/';
$smarty->config_dir = 'SMARTY_DIR.configs/';
$smarty->cache_dir = 'SMARTY_DIR.cache/';


Aber es kommt immer noch oben der Fehler.
Werde mich mal an das Hausinterne Tutorial setzen, gibt es zufällig eine dt. Übersetzung

mfg
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Mon Jun 28, 2004 8:34 pm    Post subject: Reply with quote

Ok,
ueberpruefe, ob die Verzeichnisse existieren und dass die Rechte richtig gesetzt sind.
Ich koennte mir vorstellen, dass das Problem entweder ein falscher templates Pfad oder falsche Rechte bei dem templates Verzeichnis oder der index.tpl Datei.
Der Webserver muss Zugriff darauf habe, so dass chmod 755 bei dem templates Verzeichniss und chmod 644 bei den tpl Dateien funktionieren sollte.
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 -> Language: German 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