Re: [SMARTY-DEV] Smarty and open_basedir
| From: | Dennis Gearon | Date: | Fri, 20 Dec 2002 18:38:22 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty and open_basedir | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-473@lists.php.net to get a copy of this message | ||
Does Smarty do a directory search for the file (which would not work because of permissons like
'711'), or does it just try to open it?
12/20/2002 10:12:38 AM, "Garland Foster" <garland_foster@salutia.com> wrote:
>Monte,
>
>The open_basedir value in php.ini is ".:/foo/var" (being foo var irrelevant)
>The error is seen when smarty tries to write the file of a compiled template
>(no problem accessing
>existing compiled templates)
>The error is produced because the directory structure is not being created
>and so the fwrite function fails because the path cannot be found to write
>the file.
>
>The big question is if this is a Smarty bur or an invalid configuration of
>open_basedir, is "." a valid value? Why?? Why not?
>
>Besides that I really don't know why Smarty is examining open_basedir, if
>the php script can write to the file then write it if not then we have an
>error no matter what open_basedir has since if the path to create a compiled
>template is outside open_basedir smarty will fail anyway. Am I wrong?
>
>Garland
>
>----- Original Message -----
>From: "Monte Ohrt" <monte@ispi.net>
>To: "Garland Foster" <garland_foster@salutia.com>
>Cc: "Smarty Dev" <smarty-dev@lists.php.net>
>Sent: Friday, December 20, 2002 2:35 PM
>Subject: Re: [SMARTY-DEV] Smarty and open_basedir
>
>
>> Smarty doesn't try to fail what should normally work AFAIK. Can you
>> setup a test script and give me the pertinant php.ini settings?
>>
>> You could also try $use_sub_dirs = false, see if that helps any.
>>
>>
>> On Fri, 2002-12-20 at 11:18, Garland Foster wrote:
>> > I'm using 2.3.1...
>> >
>> > ----- Original Message -----
>> > From: "Monte Ohrt" <monte@ispi.net>
>> > To: <garland_foster@salutia.com>
>> > Cc: "Smarty Dev" <smarty-dev@lists.php.net>
>> > Sent: Friday, December 20, 2002 2:10 PM
>> > Subject: Re: [SMARTY-DEV] Smarty and open_basedir
>> >
>> >
>> > > What version of Smarty are you using? I thought this was fixed in
>2.3.1.
>> > >
>> > > On Fri, 2002-12-20 at 07:51, garland_foster@salutia.com wrote:
>> > > > Hi people,
>> > > >
>> > > > A user was having a problem with our application, Smarty was
>complaining
>> > > > about ot being able to write "%4386/%836823/foo.tpl.php" (Problem
>> > writing...)
>> > > > I debugged and found that the directories where not being created at
>> > > > _write_file by the _create_dirs_structure (or so..) function.
>> > > > Why? Because the hosting company had open_basedir configured to
>> > > > "."
>so
>> > > > Smarty wasn't finding a match.
>> > > > My questions are:
>> > > >
>> > > > a)Why does Smarty care about open_basedir isn't it a PHP-level
>problem?
>> > > > I mean if other PHP applications CAN create a file/dir why do we
>make
>> > > > Smarty fail? Our user was puzzled because all the permissions where
>ok
>> > and
>> > > > he was able to create the file that Smarty couldn't from a stub php
>> > script.
>> > > > b)Is the "." value for open_basedir a right value? Why?
>> > > > c)If Smarty fails to create directories why are we getting the error
>> > when
>> > > > trying to create the file for the compiled template when it is
>obvious
>> > > > that the function will not work if the directories to-be-created
>weren't
>> > > > created?
>> > > >
>> > > > If this was already discussed my sincere apologies.
>> > > >
>> > > > Thanks for your answers!!
>> > > --
>> > > Monte Ohrt <monte@ispi.net>
>> > >
>> > >
>> > > --
>> > > Smarty Development Mailing List (http://smarty.php.net/)
>> > > To unsubscribe, visit:
>> > > http://www.php.net/unsub.php
>> > >
>> > >
>> --
>> Monte Ohrt <monte@ispi.net>
>>
>>
>> --
>> Smarty Development Mailing List (http://smarty.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>--
>Smarty Development Mailing List (http://smarty.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>