Re: __sleep() strange behavior with file writting and SESSION using

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Okay, I understand that, thanks all for your help.
I'am used to always using an absolute path, I don't know why this time I
didn't use one.
By the way, that was interesting to understand the "underground" php
behavior.



2007/11/21, Jochem Maas <jochem@xxxxxxxxxxxxx>:
>
> Andrés Robinet wrote:
> >> -----Original Message-----
>
> ...
>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > Just wanted to add, I found a log.txt at "D:\xampp\apache" which happens
> to
> > be the root of the apache installation on my system... so, moral of the
> > story, the current dir is not always the script's dir.
> > dirname(__FILE__)."/log.txt" will do the trick.
>
> I was stumped when originally reading your question. I guess I glossed
> over the fact that you weren't using an absolute path for the log file.
>
> the problem makes sense - the CWD is the directory of the script that was
> called,
> but during the startup/shutdown phases of php there is no script, the CWD
> is then
> whatever the CWD is of the process that started php - apache in this case.
> additionally
> some code may change the CWD and there maybe countless of other factors
> that could effect
> it.
>
> I suggest always using absolute paths - of only to avoid little
> mind-benders like this.
>
> :-)
>
> >
> > Rob
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux