Re: [SMARTY] Re: is this a bug?
| From: | messju mohr | Date: | Fri, 28 Feb 2003 08:21:48 +0000 |
| Subject: | Re: [SMARTY] Re: is this a bug? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8290@lists.php.net to get a copy of this message | ||
On Fri, Feb 28, 2003 at 02:24:12PM +0800, Raul wrote:
>
> On Thu, 27 Feb 2003 18:56:48 +0100, messju@lammfellpuschen.de (Messju
> Mohr) wrote:
>
> >On Fri, Feb 28, 2003 at 01:19:01AM +0800, Jun wrote:
> >> "Messju Mohr" <messju@lammfellpuschen.de> wrote in message
> >>
> >> news:20030227171055.GF19597@pharao.lammfellpuschen.de...
> >> > On Fri, Feb 28, 2003 at 12:43:23AM +0800, Jun wrote:
> >correct.
> >
> >what is printet to the page, if you do
> >
> >printf("%04o %04o %04o\n", $smarty->_dir_perms, umask(),
> >$smarty->_dir_perms & ~umask());
> >
> >it should print something like:
> >0771 0022 0751
>
>
> Its: 0771 0111 0660
ah, yes. the 0111 is the problem. this means, that all the
exec-permissios get wiped out, when a directory is created.
there are 2 possible sources for this:
1. a braindead default setting of your provider or
2. you set the umask somewhere in your script to this value.
you can check the default easily. set up a page that contains nothing
but "<?php printf("%04o", umask()); ?>" and load it. if it also says
"0111" then this is the default of your php-setup. you can override
this somewhere in your scripts with " umask(0022); " . if you use
smarty directly that put this before your call to "$smarty = new
Smarty;" . if you use your own subclass of smarty you could put this
in the constructor of your subclass before your call to
"$this->Smarty() // parent constructor". it is a matter of taste. just
make sure it is done before your very first call to fetch() or
display().
if your script above doesn't say "0111", then you already have an
erronous call to umask($value) in your scripts. search for it and
remove it.
after wiping out all the old directories in templates_c, i hope this
solves your problem permanently :)
have fun
messju