Re: [SMARTY] To have ALL information in the database (disable filesystem writes)
| From: | messju mohr | Date: | Mon, 03 Mar 2003 18:49:40 +0000 |
| Subject: | Re: [SMARTY] To have ALL information in the database (disable filesystem writes) | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8345@lists.php.net to get a copy of this message | ||
On Sat, Mar 01, 2003 at 05:42:31PM +0200, Ruslan Savchyshyn wrote:
> Hello
>
> Is it possible to disable the fylesystem writes at all and move ALL
> temporary files to database?
> I'm not talking about Cache handling - know about that.
>
> Problem is that hosting (Yahoo Hosting) doesn't support changing
> permission to files neither via their File Manger, no via FTP, so
> filesystem writes are disabled at all.
>
> And support says it won't be supported in close future,
> Also I see I'm not the first who needs this...
i agree with monte that it is a really bad idea (performance-wise) to
use something different then include() to evaluate the compiled
templates. and this requires the templates to be written to the
filesystem, of course. so i understand, that he does not want to out
any energy in this issue.
i think a good compromise, that does not need much work, would be to
encapsulate Smarty's calls to include() in a function like
Smarty::_include_compiled_template(). there are just 2-3 places in
Smarty_class.php that have to be touched.
to make the abstraction complete we would also need
Smarty::_timestamp_compiled_tpl() to encapsulate the calls to
filemtime().
then everybody can write his own template-file-handling-functions
without the need to modify Smarty_class.php. this can be done in a
class that extends Smarty and by overiding _write_compiled_template(),
_include_compiled_template() and _timestamp_compiled_template(). an
example could be put under contributions on the smarty-website. it
should be stated there that these functions are considered internal
and may change without notice in the future. i think people would
accept this constraint if it is the only way to get smarty running in
there hosting environment.
on the other side: since poeple are warned that the _-functions are
internal the developers are not constraint in future enhancements of
the compiled-file-handling if they feel need for it.
i am interested in the opinons of the men in charge of smarty and of
people who need this functionality.
with regards
messju
> Thanks, Ruslan.