Hi everyone,
I'm trying to figure out why my image script won't work on the vps server. For some reason it won't write the correct chmod permissions to a directory for the user. For example when a user signs up the script creates a folder for that user inside a folder named images. Now the images folder is set to 777 permissions and the user folder is suppose to be set to the same. Here's the part of php code that addes the new user folder to the images folder.
Anyone else run into this. Or is it just me.
Regards,
Jay
I'm trying to figure out why my image script won't work on the vps server. For some reason it won't write the correct chmod permissions to a directory for the user. For example when a user signs up the script creates a folder for that user inside a folder named images. Now the images folder is set to 777 permissions and the user folder is suppose to be set to the same. Here's the part of php code that addes the new user folder to the images folder.
Code:
[SIZE=1]if( $userid != 0 ){[/SIZE]
[SIZE=1]mkdir($this->ace->config->image_folder.$username);[/SIZE]
[SIZE=1]chmod($this->ace->config->image_folder.$username, 0777);[/SIZE]
[SIZE=1]mkdir($this->ace->config->thumb_folder.$username);[/SIZE]
[SIZE=1]chmod($this->ace->config->thumb_folder.$username, 0777);[/SIZE]
[SIZE=1]if( @file_exists(dirname(__FILE__).'/blank.htm') ){[/SIZE]
[SIZE=1]@copy(dirname(__FILE__).'/blank.htm', $this->ace->config->image_folder.$username.'/index.htm');[/SIZE]
[SIZE=1]@copy(dirname(__FILE__).'/blank.htm', $this->ace->config->thumb_folder.$username.'/index.htm');[/SIZE]
[SIZE=1]}[/SIZE]
[SIZE=1]}[/SIZE]
[SIZE=1]return $userid;[/SIZE]
[SIZE=1]}[/SIZE]
[SIZE=1]}[/SIZE]
[SIZE=1]return 0;[/SIZE]
Anyone else run into this. Or is it just me.
Regards,
Jay