View previous topic :: View next topic |
Author |
Message |
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:07 pm Post subject: smarty with an caching program on the server |
|
|
i try smarty on a server where a caching program is installed. this seems to be a problem for smarty because it doesn't work, when the caching program is enabled. i get following error:
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 16 in /test/smarty/smarty/Smarty_Compiler.class.php on line 402
if i copy the smartycopiler-class again on the server the first page runs but not the following ones.
is there any solution, exept of turning the caching program of? all i tried until now failed.
thanks |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Sep 28, 2004 2:26 pm Post subject: |
|
|
Smarty works fine with caching programs -- actually, they recommended as Smarty shows marked improvement when they are used.
Remember: don't copy your temporary files (cached/compiled) from one server to the other. Also, make sure that your source files have the correct line-endings for the target system (so if you are moving from windows to linux, you may have to convert the files).
Perhaps someone else can better tell what is going on, but if not, post some more details.
Good luck, |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:38 pm Post subject: |
|
|
i dont't use smarty's cache (i have no directory cache created) and i deleted all files from template_c. i copied from one linux server to another with putty.
smarty canot create the compiled files.
most variables given to the function preg_match (where the error occurs) are empty exept the template_tag. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Sep 28, 2004 2:42 pm Post subject: |
|
|
blackbird wrote: | smarty canot create the compiled files.
most variables given to the function preg_match (where the error occurs) are empty exept the template_tag. |
Sounds like you are misconfigured. I don't know why its not working for you, but based of the few details you gave, that should be a workable setup. |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:44 pm Post subject: |
|
|
the caching program can just be turned on or off. it is not possible to tell the caching program not to cache my files. |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:48 pm Post subject: |
|
|
what kind of information do you need? i have a test-server where the caching program isn't installed. and there it works.
if the caching program on the other is turned of it also works fine, but turning the caching program on, it doesn't work any more. is there anything i have to configure different? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Sep 28, 2004 2:50 pm Post subject: |
|
|
Well, how about the name of the caching program? Version numbers of the various softwares and OS, etc. Do I have to spell it out? How do you know it works when caching is turned off if you said caching can not be turned off? etc... |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:57 pm Post subject: |
|
|
the caching program is turck-mmcache.
im not the administrator of the server, but he turned caching of and then it works. when he turns it on again it doesn't work.
i use smarty version 2.6.2
php version 5.0.1 |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:58 pm Post subject: |
|
|
sorry if it's not clear what i mean, my english isn't so good. |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 2:59 pm Post subject: |
|
|
Turck MMCache v2.4.6 |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 3:14 pm Post subject: |
|
|
and it's a linux server |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 3:41 pm Post subject: |
|
|
is it possible that there is a problem with the mm cache version and the php version? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Sep 28, 2004 4:05 pm Post subject: |
|
|
blackbird wrote: | is it possible that there is a problem with the mm cache version and the php version? |
of course it is. every software has bugs. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Sep 28, 2004 4:17 pm Post subject: |
|
|
I apologize for being short with you there.
As for mmcache, I'm under the impression that you need to compile a version from 2.4.7-CVS to work properly with any recent build of PHP4 or PHP5. At least, I haven't had luck with older versions of mmcache either but I have had great success with 2.4.7-CVS. |
|
Back to top |
|
blackbird Smarty Rookie
Joined: 28 Sep 2004 Posts: 13
|
Posted: Tue Sep 28, 2004 4:34 pm Post subject: |
|
|
thanks a lot for your all your help. i will try out what i can do now with your information. |
|
Back to top |
|
|