|
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 |
Imperfect Smarty n00b
Joined: 19 Apr 2003 Posts: 1
|
Posted: Sat Apr 19, 2003 7:20 pm Post subject: Can't get Smarty working |
|
|
I installed Smarty, and walked through the setup instructions up to page 5, and got stuck. I got php to recognize smarty, and can instantiate an instance of the smarty object, but the moment I try and run any templates, I get the following errors:
Code: | Warning: stat failed for templates_c//%%117/%%1172603085/index.tpl.php (errno=13 - Permission denied) in /usr/local/psa/home/vhosts/imperfexion.org/httpdocs/smarty/libs/Smarty.class.php on line 1520
Warning: stat failed for templates_c//%%117/%%1172603085 (errno=13 - Permission denied) in /usr/local/psa/home/vhosts/imperfexion.org/httpdocs/smarty/libs/Smarty.class.php on line 2220
Warning: Smarty error: problem writing temporary file 'templates_c//%%117/%%1172603085/3ea19dd498f56' in /usr/local/psa/home/vhosts/imperfexion.org/httpdocs/smarty/libs/Smarty.class.php on line 1042
Warning: unable to create file templates_c//%%117/%%1172603085/index.tpl.php because Permission denied in /usr/local/psa/home/vhosts/imperfexion.org/httpdocs/smarty/libs/Smarty.class.php on line 1575
Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/imperfexion.org/httpdocs/smarty/libs/Smarty.class.php on line 1158
Warning: Failed opening 'templates_c//%%117/%%1172603085/index.tpl.php' for inclusion (include_path='.:') in /usr/local/psa/home/vhosts/imperfexion.org/httpdocs/smarty/libs/Smarty.class.php on line 1158 |
I've CHMODed the template and compile directories to 770, but beyond that I have no clue what I'm doing/not doing right. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sat Apr 19, 2003 7:33 pm Post subject: |
|
|
- try to set $smarty->compile_dir to an absolute path, to be sure smarty uses the one you chmod'ed.
- maybe chmod 770 is not enough to let the webserver write into templates_c. do chgrp ("nogroup" or "apache" or "wwwdata" or whatever your webserver runs) or try chmod 777 if you are not allowed to chgrp.
- if you run php's safe_modeset $smarty->use_sub_dirs to false.
HTH
messju |
|
Back to top |
|
Enquest Smarty Regular
Joined: 14 May 2003 Posts: 79
|
Posted: Sat Jun 07, 2003 4:53 pm Post subject: |
|
|
The thing is this error can jump up without any reason. When I'm happaly coding and make a mistake with pointing a file to for example the wrong file
$smarty->assign('tbody', 'pl_view.tpl');
$smarty->display('index.tpl');
Then somehow Smarty doesn't want to write any longer to the template_c dir
I need to change the chmod again before it starts working again!
Is it a bug... Or is this normal? _________________ -----------------------
Learning my self by trying to help others |
|
Back to top |
|
l3ean Smarty n00b
Joined: 01 Oct 2005 Posts: 1
|
Posted: Sat Oct 01, 2005 7:25 pm Post subject: chmodding...... |
|
|
There are 3 numbers for chmodding of course - User, group, world (anonymous)
The user is YOU, the site owner - NOT PEOPLE LOGGED INTO YOUR SITE SCRIPT
777 means the user, the user's group, and anonymous people can read, write, and execute.
770 means only the user and the user's group can read, write and execute, but the anonymous people that use the site in their browser can't do anything.
Don't be scared if you give anonymous people the power to write. They can only do it by their browser and if you have some script that enables them to write.....such as when smarty writes the templates, they have to have read and write access but don't need execute access so I would chmodd these things 774.
Anyway, one of my clients is having the same problem with smarty and am about to try setting this absolute path. |
|
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
|