View previous topic :: View next topic |
Author |
Message |
kleinerChemiker Smarty Rookie
Joined: 12 Dec 2003 Posts: 28
|
Posted: Mon Dec 29, 2003 8:36 pm Post subject: safe mode problems |
|
|
i get this error
Code: |
Warning: SAFE MODE Restriction in effect. The script whose uid is 893 is not allowed to access /usr/lib/php owned by uid 0 in /home/.sites/137/site197/web/php_klassen/smarty/core/core.get_include_path.php on line 34
Warning: SAFE MODE Restriction in effect. The script whose uid is 893 is not allowed to access /usr/lib/php owned by uid 0 in /home/.sites/137/site197/web/php_klassen/smarty/core/core.get_include_path.php on line 34
Warning: Smarty error: unable to read resource: "head.html" in /home/.sites/137/site197/web/php_klassen/smarty/Smarty.class.php on line 1144
|
this is my start-script
Code: |
<?php
// Smarty Library Dateien laden
define( 'SMARTY_DIR', '/home/sites/www.***.net/web/php_klassen/smarty/');
require (SMARTY_DIR . 'Smarty.class.php');
// ein guter Platz um Applikations spezifische Libraries zu laden
// require('guestbook/guestbook.lib.php');
class thorwal extends Smarty {
function thorwal() {
// Konstruktor. Diese Werte werden für jede Instanz automatisch gesetzt
$this->Smarty();
$this->template_dir = '/home/sites/www.***.net/web/thorwal-test/templates/';
$this->compile_dir = '/home/sites/www.***.net/web/thorwal-test/templates_c/';
$this->config_dir = '/home/sites/www.***.net/web/thorwal-test/configs/';
$this->use_sub_dirs = !ini_get('safe_mode');
}
}
?>
|
1) why do i get different paths in this error message and and with phpinfo() ?
2) i disabled use_sub_dirs but i still have saf mode errors
tia
MIK |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Dec 29, 2003 10:08 pm Post subject: |
|
|
smarty uses php's include_path to look for plugins when compiling. set your include_path to a set of "allowed" directories.
this can be done with ini_set() if you don't have access to httpd.conf and .htaccess |
|
Back to top |
|
kleinerChemiker Smarty Rookie
Joined: 12 Dec 2003 Posts: 28
|
Posted: Tue Dec 30, 2003 2:27 pm Post subject: |
|
|
i've access to .htaccess (at least i can protect dirs with .htaccess). but how do i change the include_path from php with .htaccess?
tia
MIK |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
|
Back to top |
|
kleinerChemiker Smarty Rookie
Joined: 12 Dec 2003 Posts: 28
|
Posted: Thu Jan 01, 2004 10:04 pm Post subject: |
|
|
ok, it seems that i can use this, but now i get an internal server error
MIK |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Thu Jan 01, 2004 10:59 pm Post subject: |
|
|
kleinerChemiker wrote: | ok, it seems that i can use this, but now i get an internal server error |
Most likely you added wrong entries to the .htaccess file. You can easily check on this, by renaming or deleting the .htaccess file and see if you still get that internal server error message.
If not, then it's a problem with the entries in the .htaccess file and you should check on the syntax. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Jan 01, 2004 11:25 pm Post subject: |
|
|
you may get "Internal Server Error" because "Override Options" is not allowed in your .htaccess. the error_log of the webserver gives you more info about the problem. |
|
Back to top |
|
kleinerChemiker Smarty Rookie
Joined: 12 Dec 2003 Posts: 28
|
Posted: Fri Jan 02, 2004 10:09 am Post subject: |
|
|
thx.
but i have no access to the error log.
maybe i can change the include dir with php. irc there is a function to override some php settings also with php.
MIK |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Jan 02, 2004 10:11 am Post subject: |
|
|
that's what i suggested already in my first reply: ini_set() |
|
Back to top |
|
kleinerChemiker Smarty Rookie
Joined: 12 Dec 2003 Posts: 28
|
Posted: Fri Jan 02, 2004 10:21 am Post subject: |
|
|
edit: thx, this problem is solved now
but, there is stil an other problem. i have this code in my setup-skript:
Code: |
<?php
// Smarty Library Dateien laden
define( 'SMARTY_DIR', '/home/sites/www.***.net/web/php_klassen/smarty/');
require (SMARTY_DIR . 'Smarty.class.php');
// ein guter Platz um Applikations spezifische Libraries zu laden
// require('guestbook/guestbook.lib.php');
class thorwal extends Smarty {
function thorwal() {
// Konstruktor. Diese Werte werden für jede Instanz automatisch gesetzt
$this->Smarty();
$this->template_dir = '/home/sites/www.***.net/web/thorwal-test/templates/';
$this->compile_dir = '/home/sites/www.***.net/web/thorwal-test/templates_c/';
$this->config_dir = '/home/sites/www.***.net/web/thorwal-test/configs/';
$this->use_sub_dirs = !ini_get('safe_mode');
echo '<!-- test -->';
}
}
?>
|
i found this code in the cowiki. but it seems, that the konstruktor stops being executed befor $this->use_sub_dirs, because there is no comment in the errors and Use_sub_dirs isn't set to false. if i set it to false in the main script in each template-start, it function well.
tia
MIK |
|
Back to top |
|
prutwo Smarty n00b
Joined: 19 Jan 2004 Posts: 1
|
Posted: Mon Jan 19, 2004 11:56 pm Post subject: I'm having the same error |
|
|
Hi all,
I'm having the same error, and read all the forum messages about use sub dirs. If it helps, i'm hosted on an ensim server.
I have:
var $use_sub_dirs = false;
in my main smarty class, but I'm still getting these errors:
Code: |
Warning: Smarty error: problem creating directory "./templates_c//%%110/%%1106396952" in /home/virtual/site55/fst/var/www/html/main/backends/smarty2/libs/Smarty.class.php on line 1042
Warning: Smarty error: problem writing temporary file './templates_c//%%110/%%1106396952/400c69ac7a99c' in /home/virtual/site55/fst/var/www/html/main/backends/smarty2/libs/Smarty.class.php on line 1042
Warning: touch(): SAFE MODE Restriction in effect. The script whose uid is 722 is not allowed to access /home/virtual/site55/fst/var/www/html/main/templates_c/%%110 owned by uid 48 in /home/virtual/site55/fst/var/www/html/main/backends/smarty2/libs/Smarty.class.php on line 1575
Warning: fetch(): Unable to access ./templates_c//%%110/%%1106396952/header.tpl.php in /home/virtual/site55/fst/var/www/html/main/backends/smarty2/libs/Smarty.class.php on line 1158
Warning: fetch(./templates_c//%%110/%%1106396952/header.tpl.php): failed to open stream: No such file or directory in /home/virtual/site55/fst/var/www/html/main/backends/smarty2/libs/Smarty.class.php on line 1158
Warning: fetch(): Failed opening './templates_c//%%110/%%1106396952/header.tpl.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site55/fst/var/www/html/main/backends/smarty2/libs/Smarty.class.php on line 1158
|
Any suggestions ?
OP |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Jan 20, 2004 11:43 am Post subject: Re: I'm having the same error |
|
|
prutwo wrote: | Any suggestions ? |
you did something wrong in your setup. the error-messages indicate use_sub_dirs is on in your setup. |
|
Back to top |
|
|