Current location: Hot Scripts Forums » Programming Languages » PHP » creating multiple directories using php


creating multiple directories using php

Reply
  #1 (permalink)  
Old 01-27-04, 05:57 PM
seans9 seans9 is offline
Newbie Coder
 
Join Date: Sep 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question creating multiple directories using php

ok. i want to make a directory, then make a subfolder for that directory.

the script is making the first directory which is $foldername and the next one should be $foldername/pics but its not working. im getting some weird error:

Warning: SAFE MODE Restriction in effect. The script whose uid is 13749 is not allowed to access....blablabla

this is what i have. please help me out! thanks

PHP Code:

<?


$foldername
="bob";

mkdir("/usr/local/psa/home/vhosts/absolute-design.net/httpdocs/websites/$foldername"0777);
chmod"/usr/local/psa/home/vhosts/absolute-design.net/httpdocs/websites/$foldername"0777 ); 
mkdir("/usr/local/psa/home/vhosts/absolute-design.net/httpdocs/websites/$foldername/pics"0777);
chmod("/usr/local/psa/home/vhosts/absolute-design.net/httpdocs/websites/$foldername/pics"0777 ); 


?>

Last edited by seans9; 01-27-04 at 06:12 PM.
Reply With Quote
  #2 (permalink)  
Old 01-27-04, 06:17 PM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Your attempting to create a directoryy within a directory, this is not allowed within safemode, only operations to the root are allowed.

Email your hosting company, and request safemode to be removed.
Reply With Quote
  #3 (permalink)  
Old 01-27-04, 06:36 PM
seans9 seans9 is offline
Newbie Coder
 
Join Date: Sep 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Rapid Dr3am
Your attempting to create a directoryy within a directory, this is not allowed within safemode, only operations to the root are allowed.

Email your hosting company, and request safemode to be removed.
well see the thing is that it makes the first directory and chomd it to 777 but for some reason it wont create the 2nd one. is there any way around that?
Reply With Quote
  #4 (permalink)  
Old 01-28-04, 01:00 AM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hello,

There should be no problem woth your script. I have done something more or less the same and it worked fine.

Like Rapid Dr3am and PHP say, the problem is safemode, I think.

Good luck.
__________________
Blavv =|
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 06:02 AM
error when creating database tables with php script spiroth10 PHP 4 01-06-04 03:59 PM
PHP: check data transfer on certain directories? Agum PHP 7 12-30-03 03:58 AM
creating directories canhelie PHP 3 12-16-03 10:07 PM
Creating directories and files cobalto2060 PHP 1 08-17-03 03:20 PM


All times are GMT -5. The time now is 08:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.