NYCPHP Meetup

NYPHP.org

[nycphp-talk] Why can't I create a second directory?

Kenneth Dombrowski kenneth at ylayali.net
Thu Aug 30 10:45:49 EDT 2007


On 07-08-30 08:22 -0400, Gary Mort wrote:
>                
> $path = "/var/www/vhosts/mydomain.com/httpdocs/j/components/com_test/test/";
> $mode = 0777;
>                if (!@mkdir(substr($path,0,-1),$mode)) {
>                    die ("Cannot create ".substr($path,0,-1));
>                }
> 

Hi Gary, 

what does it complain about when you remove the error supression @s ? 

also, i'm curious, why are the calls to substr() necessary? 

does shelling out to mkdir work? 

 `mkdir -p /var/www/vhosts/mydomain.com/httpdocs/j/components/com_test/test`

is this a cli script, or one you trigger via apache?  what user is
running it & what exactly are the permissions? 





More information about the talk mailing list