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

problems with config_load

 
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 -> General
View previous topic :: View next topic  
Author Message
juque
Smarty Rookie


Joined: 30 Apr 2003
Posts: 8

PostPosted: Thu May 01, 2003 8:45 pm    Post subject: problems with config_load Reply with quote

Hi everyone,

I don't know why when I ran the first time my script i get the next message:
Quote:

Warning: stat failed for /layout.conf (errno=2 - No such file or directory) in C:\Archivos de programa\Apache Group\Apache2\htdocs\phpjuqueauthenv2\include\Smarty.class.php on line 1325

Warning: utime failed: Invalid argument in C:\Archivos de programa\Apache Group\Apache2\htdocs\phpjuqueauthenv2\include\Smarty.class.php on line 1325

And it doesn't happen until when I delete my templates_c directory.


index.php
-----------
require_once("include/Smarty.class.php");
include_once("include/common.php");
$plantilla = new Smarty;
$plantilla->assign(array('titulo' => 'Ingresar',
'nombresistema' => $config['nombresistema'],
'version' => $config['version'],
'autor' => $config['autor'],
'correoautor' => $config['correoautor']
));

$plantilla->display("login.tpl");


login.tpl
----------
{config_load file="layout.conf"}
{include file="header.tpl"}
{$errores}
<h1>{$nombresistema} :: {$titulo}</h1>
<form name="form1" method="post" action="">
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
blah blah blah ...



layout.conf
---------------
BodyColorFondo = "#eeeeee"
TablaColorBorde = "#666666"
TableTamanoBorde = "0"
RellenoCeldas = "5"
EspacioCeldas = "1"
TableColorFondo = "#ffffff"
RowColorFondo = "#ffffff"

What is the problem?
TIA
_________________
.:: JUan Pablo AqueveQUE ::.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Thu May 01, 2003 10:36 pm    Post subject: Reply with quote

Perhaps useing the full path to the config file
_________________
"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


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

PostPosted: Thu May 01, 2003 10:54 pm    Post subject: Reply with quote

AZTEK wrote:
Perhaps useing the full path to the config file


yes. when setting up the smarty object, make sure plugins_dir, templates_dir, etc. all have full paths.

juque:
Your code doesn't actually show you setting these items. The only way the code you listed could possibly be setting these all important items is if you modified the Smarty.class.php file directly (which you shouldn't do to set these items.)

See: http://smarty.php.net/manual/en/installing.smarty.basic.php
Back to top
View user's profile Send private message
juque
Smarty Rookie


Joined: 30 Apr 2003
Posts: 8

PostPosted: Fri May 02, 2003 3:42 pm    Post subject: Reply with quote

Hi AZTEK and boots!.

I am so sorry to ask without before to read the manual.

My error was stupid, my file conf was outside of the directory 'config'. That was what caused the problem.

Thanks a lot for your replies guys!

happy coding!
_________________
.:: JUan Pablo AqueveQUE ::.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
sz
Smarty n00b


Joined: 29 Jul 2003
Posts: 1

PostPosted: Tue Jul 29, 2003 2:43 pm    Post subject: Reply with quote

hi,

i have the same problem that juque had a couple of months ago:
if i delete all the files from templates_c folder i get the error message mentioned before (stat failed for /languages.conf (errno=2 - No such file or directory) in ... Smarty.class.php on line 1325)

in Smarty.class.php on line 1325 you can find this:
Code:
touch($_compile_file,filemtime($_file_path));


after refreshing the page in the browser the error message disappears. it seems to be that the requested file does not exist at the moment when the smarty class wants to touch it.

i use smarty on windows xp, i have tried to give the full path (c:/program files/bla bla bla/smarty/config) which produced the same error. after deleting (commenting) the 1325th line no error message was displayed as it is expected.

thanks for reading me, guys.
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 -> General 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