Re: MkDir Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 Oct 2008, at 00:33, Jason Todd Slack-Moehrle wrote:
I want to make a directory on my web server programatically when my code to create a new user runs.

I am running PHP 5.2.5 on Linux.

I am running:

$dirToCreate = "..".$_SESSION['s_USER_URL'];
mkdir($dirToCreate, 0777, TRUE); // create the directory for the user

$dirToCreate is: ../people/jason as an example

When I create this I am in <wwwroot>/admin and I want to create <wwwroot>/people/jason

<wwwroot>/people already exists.

I get an error:

Warning: mkdir() expects at most 2 parameters, 3 given in
/home/net1003/public_html/admin/_createPage.inc on line 5

Even without TRUE< this operation does not work.

Does anyone have any thoughts?

Permissions. Does the web user have write access to wwwroot? Without it that function call will fail.

Also I don't think you're really running 5.2.5 since the recursive (3rd) parameter was added in 5.0. AFAIK the only way it would think mkdir takes no more than 2 parameters is if you're using an older version.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux