Re: Re: log in destructors?
| From: | Stig S. Bakken | Date: | Tue, 09 Apr 2002 14:19:16 +0000 |
| Subject: | Re: Re: log in destructors? | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1125@lists.php.net to get a copy of this message | ||
On Tue, 2002-04-09 at 14:56, Tomas V.V.Cox wrote:
> El mar, 09-04-2002 a las 14:46, Stig S. Bakken escribió:
> > On Tue, 2002-04-09 at 14:11, Martin Jansen wrote:
> > > On 09 Apr 2002 13:48:13 +0200, Tomas V.V.Cox wrote:
> > >
> > > >El mar, 09-04-2002 a las 13:12, Martin Jansen escribió:
> > > >> On Tue, 09 Apr 2002 13:02:09 +0200, Tomas V.V.Cox wrote:
> > > >>
> > > >> >Robert Janeczek wrote:
> > > >> >>
> > > >> >> $t=new Testus();
> > > >> >
> > > >> >$t = &new Testus();
> > > >> > ^-> PEAR destructors needs create the object by reference
> > > >>
> > > >> Ahh, I did not see that before replying. But why do I get the
> > > >> access denied error in this case?
> > > >>
> > > >
> > > >Try using the full path (or realpath()) for the file (why not add it
> > > >inside the class?).
> > >
> > > When using the full path, it works - looks like a bug in PHP.
> >
> > Actually, it's reasonable to chdir to / before ending the request, in
> > case your cwd is on a file system that someone wants to unmount.
> >
>
> You mean umount with PHP from the web? Anyways, is not that reasonable
> when the CGI SAPI doesn't do that.
No no, if your PHP script is on a file system (let's say /usr/local/foo)
that is nfs-mounted, and apache processes still have /usr/local/foo as
their cwd after the request is done, "umount /usr/local/foo" will fail.
(Doesn't have to be nfs-mounted either, but that's a setting where the
problem occurs more often than with local filesystems.)
- Stig