|
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 |
Draugfor Smarty n00b
Joined: 14 Jul 2004 Posts: 2
|
Posted: Wed Jul 14, 2004 3:15 pm Post subject: Unable to access... templates_c problem |
|
|
Hi!
I just uploaded latest Smarty version to my host.
Here's structure of my website:
mmp
-mmp_config
--configs
--templates
--templates_c
--cache
-smarty
When logging in using Total Commander i see an adress:
/.www/mmp/mmp_config
But i figured out i'd better not add /.www to the absolute path, dunno why.
Now, in directory mmp i have a file called example.php:
[php:1:53ee4baee6]
<?
...
include('mmp_config/search.php');
?>
[/php:1:53ee4baee6]
File search.php is:
[php:1:53ee4baee6]<?
require($mmp_adres_smarty); //this is okay
$smarty=new Smarty;
$smarty->template_dir = '/mmp/mmp_config/templates';
$smarty->compile_dir = '/mmp/mmp_config/templates_c';
$smarty->config_dir = '/mmp/mmp_config/configs';
...
$smarty->display('search.tpl');
?>[/php:1:53ee4baee6]
search.tpl is in templates directory (chmod even 777).
The error i get is:
Code: |
Warning: Unable to access /mmp/mmp_config/templates_c/%%D0^D0B^D0BAFE5D%%search.tpl.php in /mmp/smarty/libs/Smarty.class.php on line 1247
Warning: Failed opening '/mmp/mmp_config/templates_c/%%D0^D0B^D0BAFE5D%%search.tpl.php' for inclusion in /mmp/smarty/libs/Smarty.class.php on line 1247
|
templates_c, cache chmod 777.
chown is not understood by server.
safemode on, usesubdirs false.
Anyone can help? |
|
Back to top |
|
nzsmarty Smarty Rookie
Joined: 03 Jul 2004 Posts: 15 Location: New Zealand
|
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jul 14, 2004 9:24 pm Post subject: |
|
|
that "/.www" is the top directory via ftp does not necessarily mean it is the top directory for the php-script running. run a script like:
<?php echo realpath(dirname(__FILE__)); ?>
or
<?php phpinfo(); ?>
to get more insight on the environment you are installing. |
|
Back to top |
|
Draugfor Smarty n00b
Joined: 14 Jul 2004 Posts: 2
|
Posted: Wed Jul 14, 2004 9:27 pm Post subject: |
|
|
Thanks for your reply!
Well, i did what you suggested.
Let's see:
1. Relative paths.
Code: |
Warning: Smarty error: unable to read resource: "search.tpl" in /mmp/smarty/libs/Smarty.class.php on line 1083
|
2. /.www/... paths.
Code: |
Warning: Smarty error: unable to read resource: "search.tpl" in /mmp/smarty/libs/Smarty.class.php on line 1083
|
3. /mmp/ paths.
Code: |
Warning: Unable to access /mmp/mmp_config/templates_c/%%D0^D0B^D0BAFE5D%%search.tpl.php in /mmp/smarty/libs/Smarty.class.php on line 1247
Warning: Failed opening '/mmp/mmp_config/templates_c/%%D0^D0B^D0BAFE5D%%search.tpl.php' for inclusion in /mmp/smarty/libs/Smarty.class.php on line 1247
|
Well, apart from this, for your consideration, i did an experiment.
[php:1:bd218f0787]
<?
require('/mmp/smarty/libs/Smarty.class.php');
?>
[/php:1:bd218f0787]
And no error messages.
[php:1:bd218f0787]
<?
require('/.www/mmp/smarty/libs/Smarty.class.php');
?>
[/php:1:bd218f0787]
Error:
Code: |
Warning: Unable to access /.www/mmp/smarty/libs/Smarty.class.php in /mmp/mmp_config/search.php on line 19
Fatal error: Failed opening required '/.www/mmp/smarty/libs/Smarty.class.php' in /mmp/mmp_config/search.php on line 19
|
So i guess that no /.www is right.
---
Okay, let me add, that i tried running a simple counter script there, it was able to create, read and write a file that was in templates_c directory without any trouble.
And i got some files created in my templates_c directory. Those were created by smarty. Their names are:
write_caWPQw
write_GP1dag
and so on.
Well, any ideas?
EDIT
Thanks, messju, for you answer.
/mmp/mmp_config is okay, so there is no /.www/
EDIT#2
Hey, I didn't mention i got no files in the config_dir. Is that okay?
EDIT#3
I even tried that demo that is included to each smarty release.
Here is what i got:
Code: |
Warning: Failed opening 'templates_c/%%45^45E^45E480CD%%index.tpl.php' for inclusion in /mmp/smarty/libs/Smarty.class.php on line 1247
Warning: Failed opening 'templates_c/%%45^458^458E1659%%debug.
tpl.php' for inclusion in /mmp/smarty/libs/Smarty.class.php on line 1922
|
EDIT#4
Okay, yet another hint for you
When i tried to create manually, using ftp program, a file called e.g. %%45^45E^45E480CD%%index.tpl.php - i got an error message. Here, where my site is, filenames with % and ^ seem to be forbidden. |
|
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
|