General [M]ayhem

Go Back   General [M]ayhem > Real Time Sub-Forums > CompuGlobalHyperMegaNet
Register Members List Mark Forums Read [M]erchandise Calendar

Reply
 
Thread Tools
Mertous
 
time for another one of my daily php help threads

Code:
$userdir = "./images/users/".$_SESSION['User'];
$thumbs = $userdir."/thumbs";
mkdir($userdir,0777);
chmod($userdir,0777);
mkdir($thumbs,0777);
chmod($thumbs,0777);
the first directory ($userdir) is created. Because of something to do with umask it doesn't get created with full write permissions as I request in my code, so I chmod it to change to full write permissions.

Up to there works.

The second directory ($thumbs) isn't created at all, yet I get no php error produced at all. This piece of code is on my registration page, and when a new user is created it says everything was all fine and the user has been added bla bla, but doesn't give any error about the thumbs dir not being created or anything, yet if I check the ftp, there's evidently nothing there.
Old 03-20-2005, 10:30 AM Mertous is offline  
Reply With Quote
#1  

Advertisement [Remove Advertisement]

solareon
 
is thumbs being created under user dir?
__________________
Gen[M]ay [M]azda Owner
2010 RX-8 R3
1990 RX-7 GXL
1987 RX-7 TII - sold =(
Old 03-20-2005, 12:26 PM solareon is offline  
Reply With Quote
#2  

Mertous
 
Quote:
Originally Posted by solareon
is thumbs being created under user dir?

it should be doing the following:

1. create directory: ./images/users/username/
2. change permissions on .images/users/username to 777 (all read, all write, all execute).
3. create directory ./images/users/username/thumbs
4. change permissions on .images/users/username/thumbs to 777 (all read, all write, all execute).

At the moment it gets no further than step 2. the thumbs directory isn't created at all
Old 03-20-2005, 12:33 PM Mertous is offline  
Reply With Quote
#3  

Mertous
 
bump.

I'm pulling my hair out here guys - no idea what I've done wrong at all all looks fine to me
Old 03-20-2005, 02:46 PM Mertous is offline  
Reply With Quote
#4  

Mertous
 
up
Old 03-20-2005, 03:54 PM Mertous is offline  
Reply With Quote
#5  

CeleronDude
 
umask affects file permissions. Do this before chmod

$o = umask ( 0 );
// chmod here
umask ( $o );
__________________
f48fe4e3e31f9a9b2fae1c7ef3ddb021
Old 03-20-2005, 03:57 PM CeleronDude is offline  
Reply With Quote
#6  

Reply


Thread Tools

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 On
HTML code is Off

Forum Jump



All times are GMT -7. The time now is 09:28 AM.



Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.