You are here: Re: mkdir() and safe_mode « PHP Programming Language « IT news, forums, messages
Re: mkdir() and safe_mode

Posted by Markus on 07/03/07 10:15

gosha bine schrieb:
> Markus wrote:
>> Hello
>>
>> I ran into the commonly known problem that under safe_mode it is
>> possible to create a directory with mkdir(), but impossible to create
>> a subdirectory inside the first one:
>>
>> 1 $path = $_SERVER['DOCUMENT_ROOT'].'/cache';
>> 2 mkdir($path, 0755);
>> 3 chmod($path, 0777);
>> 4 mkdir($path.'/subdir', 0755);
>> [snip]
>
> The classic way to work around a "safe mode" is to create your php files
> dynamically instead of uploading them. I.e. you upload one single
> "unroll" script that generates all worker scripts and saves them to
> files. Since those generated scripts are owned by apache, they won't
> have any trouble accessing files that they create.

Thanks, I will keep this in mind - I already thought of trying to build
a convenient installer for my application as soon as I have time; and
with this background that will be even more desirable.

 

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

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