Re: [SMARTY] Installationprob
| From: | messju mohr | Date: | Mon, 23 Jun 2003 11:31:09 +0000 |
| Subject: | Re: [SMARTY] Installationprob | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9753@lists.php.net to get a copy of this message | ||
On Mon, Jun 23, 2003 at 01:22:15PM +0200, Wilhelm Kutting wrote:
> In article <20030623105549.GB5296@pharao.lammfellpuschen.de>,
> messju@lammfellpuschen.de says...
> > On Mon, Jun 23, 2003 at 11:49:11AM +0200, Wilhelm Kutting wrote:
> > > Hi
> > > i put the smartyclass under /usr/local/lib/php/Smarty/
> > > made it 777 and gave the ownership to root/root
> >
> > don't make it world-writable! only templates_c and cache have to be
> > writable by the webserver.
> >
> > i would suggest only putting the "libs"-directory of the
> > smarty-distribution into /usr/local/lib/... and putting templates_c
> > and cache somewhere near the web-application. multiple web-sites can
> > use a single Smarty.class.php, but different template_c-directories
> > then.
> Ok i put it under /usr/local/lib/php/Smarty
> like written in Smarty installtion guide but i am not sure if i should
> use the php in the path? Is there a reason to put it under /php
> > > When i now call
> > > require('/usr/local/lib/php/Smarty/Smarty.class.php');
> > >
> > > i get the following error:
> > > Warning: SAFE MODE Restriction in effect. The script whose uid is 640 is
> > > not allowed to access /usr/local/lib/php/Smarty/Smarty.class.php owned
> > > by uid 0
> > >
> That is gone now ...Thanks
> > if you have a directory, that should be accesible by different uids,
> > even in safemode, you can put it in safe_mode_include_dir:
> >
> > see
> > http://php.net/manual/en/features.safe-mode.php#ini.safe-mode-include-dir
> >
> > of course this only makes sense, if the directory in question is not
> > world-writable.
> i tried that only for gettin it running and close it later with a 644.
>
> i edited the php.ini and added
> safe_mode_include_dir=/usr/local/bin/php/Smarty
> and added the thing to the include_path like written in
> http://www.php.net/manual/en/features.safe-mode.php
>
> i surely restarted the apache and now i get
> Warning: open_basedir restriction in effect. File is in wrong directory
> in /home/www/myweb/html/testsmarty.php
this is also answered on http://www.php.net/manual/en/features.safe-mode.php
> > HTH
> > messju
> >
> > > a possible answer could be to turn the safemode off but i think that
> > > could cause security problems and hope there is another solution?
> > >
> > > Wilhelm