| 
	
 | 
 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?
 
  
Navigation:
[Reply to this message] 
 |