RE: [PHP] exec / mkdir question

2002-08-12 Thread Daniel Kushner

Try using the mkdir function:
http://www.php.net/manual/en/function.mkdir.php

Daniel Kushner
[EMAIL PROTECTED]

Need hosting? http://www.thehostingcompany.us/


 -Original Message-
 From: Javier Montserat [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 11:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] exec / mkdir question
 
 
 i'm using the following code to create a directory :-
 
 $temp = exec(mkdir $path);
 
 it doesn't work...
 
 i've validated the $path var which is correct.  i suspect it is a 
 permissions issue.
 
 what should i look for to resolve this?
 
 thanks,
 
 javier
 
 
 
 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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




RE: [PHP] exec / mkdir question

2002-08-12 Thread Simon Ritchie

  i'm using the following code to create a directory :-
 
  $temp = exec(mkdir $path);
 
  it doesn't work...
 
  i've validated the $path var which is correct.  i suspect it is a
  permissions issue.
 
  what should i look for to resolve this?


 Try using the mkdir function:


That is good practice, but if the problem is with the  permissions, the
program will just be better written when it fails.

A note of the error message and some information about the host environment
would help.  However ...

The user running the PHP script needs to be able to create the file.  If
this is a UNIX system and the web server is run by the user nobody, then
that user needs write access to the directory which will contain the file.
To grant that access, your user (the one you, er, use to connect to the
server) must own the directory

The worst case is when your user and the web server user are not in the same
group.  In that case, you will need to grant write access to all users.
This introduces potential security risks - any user can also remove or
rename files in that directory.

Simon Ritchie

Download my introduction to PHP for $25:
http://merrowinternet.com/downloads?source=ml


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




RE: [PHP] exec / mkdir question

2002-08-12 Thread Brian V Bonini

Just curious, any reason you don't use the mkdir function/

mkdir (/path/to/my/dir, 0700);

-Brian

 -Original Message-
 From: Simon Ritchie [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 2:50 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] exec / mkdir question


   i'm using the following code to create a directory :-
  
   $temp = exec(mkdir $path);
  
   it doesn't work...
  
   i've validated the $path var which is correct.  i suspect it is a
   permissions issue.
  
   what should i look for to resolve this?

 
  Try using the mkdir function:


 That is good practice, but if the problem is with the  permissions, the
 program will just be better written when it fails.

 A note of the error message and some information about the host
 environment
 would help.  However ...

 The user running the PHP script needs to be able to create the file.  If
 this is a UNIX system and the web server is run by the user nobody, then
 that user needs write access to the directory which will contain the file.
 To grant that access, your user (the one you, er, use to connect to the
 server) must own the directory

 The worst case is when your user and the web server user are not
 in the same
 group.  In that case, you will need to grant write access to all users.
 This introduces potential security risks - any user can also remove or
 rename files in that directory.

 Simon Ritchie

 Download my introduction to PHP for $25:
 http://merrowinternet.com/downloads?source=ml


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



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




RE: [PHP] exec / mkdir question

2002-08-12 Thread vic

// Create user directory
/* $user-id is a variable that contains the use name from a form field,
that's how I name my new directories, u can use whateve u want*/
mkdir ( /path/to/dir/$user_id, 0755 )
or die ( Could not create custom user directory. );

- Vic


-Original Message-
From: Simon Ritchie [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 12, 2002 2:50 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] exec / mkdir question

  i'm using the following code to create a directory :-
 
  $temp = exec(mkdir $path);
 
  it doesn't work...
 
  i've validated the $path var which is correct.  i suspect it is a
  permissions issue.
 
  what should i look for to resolve this?


 Try using the mkdir function:


That is good practice, but if the problem is with the  permissions, the
program will just be better written when it fails.

A note of the error message and some information about the host
environment
would help.  However ...

The user running the PHP script needs to be able to create the file.  If
this is a UNIX system and the web server is run by the user nobody, then
that user needs write access to the directory which will contain the
file.
To grant that access, your user (the one you, er, use to connect to the
server) must own the directory

The worst case is when your user and the web server user are not in the
same
group.  In that case, you will need to grant write access to all users.
This introduces potential security risks - any user can also remove or
rename files in that directory.

Simon Ritchie

Download my introduction to PHP for $25:
http://merrowinternet.com/downloads?source=ml


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

__ 
Post your ad for free now! http://personals.yahoo.ca

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