|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ronsen Smarty Rookie
Joined: 07 Jun 2003 Posts: 13 Location: Baden/Wien Austria
|
Posted: Sun Jun 29, 2003 9:41 am Post subject: Warning: ...(errno=13 - Permission denied) |
|
|
Hi Forum,
I get this warning mess and can not find out where the error is. Everything works except if I use {config_load file="main.conf"} in my template file.
the error mess is:
Code: |
Warning: filemtime() [function.filemtime]: Stat failed for /www/weronet/configs//main.conf (errno=13 - Permission denied) in /usr/local/lib/php/Smarty/Smarty.class.php on line 2364
// on line 2364 I found
..if ($this.compile_check...
foreach ($this->_cash_info[template]......
|
in my index.php I call the setup.php like
Code: |
require( $_SERVER['DOCUMENT_ROOT'] . "/include/setup.php");
|
in setup is a function with
Code: |
........
$this->Smarty();
$this->template_dir = $_SERVER['DOCUMENT_ROOT'] . "/templates/";
$this->compile_dir = $_SERVER['DOCUMENT_ROOT'] . "/templates_c/";
$this->config_dir = $_SERVER['DOCUMENT_ROOT'] . "/configs/";
$this->cache_dir = $_SERVER['DOCUMENT_ROOT'] . "/cache/";
$this->caching = true;
............
|
and in my tpl
Code: |
{config_load file="main.conf"}
{include file="file:/www/weronet/templates/header.tpl.php" title=#Startseite#}
<table width="100%" class="mess">
...
|
with out {config_load file="main.conf"} it works.
I tried to chmod 777 of ./configs dir also the templates dir because
something is unusual, if I clean the cache-dir manually and run the index.php it works the first time, at the second I get this warning again.
I also delete everything in main.conf so it is empty.
again, every page works if config_load file is not included.
can anyone help me please?
thank you in advance
ron |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Jul 02, 2003 8:28 pm Post subject: |
|
|
{include file="file:/www/weronet/templates/header.tpl.php" title=#Startseite#}
Perhaps unrelated, but that can't be right. Are you using ".tpl.php" as your template extension?? I doubt it. Don't you mean:
{include file="header.tpl" title=#Startseite#}
?? |
|
Back to top |
|
ronsen Smarty Rookie
Joined: 07 Jun 2003 Posts: 13 Location: Baden/Wien Austria
|
Posted: Wed Jul 02, 2003 9:16 pm Post subject: |
|
|
Hi boots,
yes I do, because it's easy to edit the script with Macromedia Dreamweaver.
I think it doesn’t madder what extension you use, or? every page works and is compiled.
I'm not sure what it means, but now I put this two lines in my php script
Code: |
error_reporting("E_ALL");
ini_set('display_errors', 1);
|
and no error appears anymore ???
Ron _________________ no one is perfect |
|
Back to top |
|
dthought Smarty Regular
Joined: 21 Apr 2003 Posts: 55 Location: Melbourne, Australia
|
Posted: Fri Jul 11, 2003 11:31 am Post subject: |
|
|
I can't say I recommend using PHP extensions for Smarty TPLs.
If you're using Macromedia Dreamweaver MX, do this:
Navigate using Explorer to:
%userprofile%\Application Data\Macromedia\Dreamweaver MX\Configuration
Edit the file extensions.txt
Add tpl to the HTML docs line (Don't forget the separating comma).
If you have DW open, restart it. It will now recognise .tpl files as being HTML. Enjoy. |
|
Back to top |
|
|
|
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
|