You are here: Re: fopen - append works, write fails (but file is truncated) « PHP Programming Language « IT news, forums, messages
Re: fopen - append works, write fails (but file is truncated)

Posted by Hans Fredrik Nordhaug on 07/31/07 21:36

On 2007-07-31, Jerry Stuckle wrote:
> Hans Fredrik Nordhaug wrote:
>> On 2007-07-31, frode.nordahl@gmail.com wrote:
>>> On Jul 28, 7:58 am, Hans Fredrik Nordhaug <han...@gmail.com> wrote:
[cut]
>>>> PS! I have contacted the hoster - I'll let you know if they have
>>>> some explanation/solution to the issue.
>>> I have investigated this, and there is indeed a problem on our part.
>>> The problem was introduced when we upgraded a web server, and is
>>> caused by incompatibilities with some of the file servers. This does
>>> not affect all of our users.
>>
>> Thx for the info - I'm glad it wasn't me (or a bug in PHP).
>>
>>> If you want, I can move your account to a different file server. I was
>>> about to do this anyway, but I discovered that you reference absolute
>>> paths in your scripts. I advise you to use relative paths or at least
>>> build the paths from $_ENV['HOME'] or similar.
>>
>> Feel free to move my account - just send me an e-mail when it's done.
>> (If the issue is fixed this week without moving, I can wait.)
>>
>> Hans
>>
>> PS! I would of course prefer to use $_ENV['HOME'], but $_ENV doesn't
>> contain HOME because the current user is "nobody" ... The absolute
>> paths is set in one single file so updating is no problem.
>
> Use $_SERVER['DOCUMENT_ROOT'] instead. It contains the root directory
> of your virtual host. No changes required when you move your site.

Or just dirname(__FILE__). It is a non-issue, but thx for caring.

Hans

--
+ It's GNU/Linux, not Linux -> http://www.gnu.org/gnu/linux-and-gnu.html
+ Support the Free Software Foundation -> http://member.fsf.org/
+ Become an Open Directory Project Editor -> http://dmoz.org/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация