Reply to problem setting permisions

Your name:

Reply:


Posted by harvey on 05/23/07 17:22

I'm not sure if this is a linux, apache or PHP problem but I'm using PHP
to do it so I'll start here:

if I do
$myDir = '/temp/';

mkdir($myDir,0777);
chmod($myDir,0777);

I get a directory with 777 permissions. That seems fine.
(The chmod seems needed to undo a mask)
The directory is created with owner & user as Apache

However if I now do:


if (!mkdir($myDir . 'subDir/',0777)) {
echo('Creation error');
}
chmod($myDir . 'subDir/',0777);

I've tried removing the trailing slash to no effect.

PHP fails to create subDir/ at all AND doesn't flag up the error.
I expect I'm missing something fundamental but can't see what.

Can anyone help please?

[Back to original 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

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