Maxigallery upload chmod error
doze:
It's definitely something server specific, because the snippet has ~ 6700 downloads and not very many get this error..
Try changing lines 371 - 378 in maxigallery.php from:
Code:
move_uploaded_file( $_FILES['file'.$i]['tmp_name'] , $mg->path_to_gal.$name );
chmod($mg->path_to_gal.$name,0666);
$handleMessage = $mg->handleFile($name, $modx->db->getRecordCount($rsx));
if ($handleMessage != "") {
$manageOuterTplData['messages'] .= $handleMessage;
$upload_error = true;
}
to:
Code:
if(move_uploaded_file( $_FILES['file'.$i]['tmp_name'] , $mg->path_to_gal.$name )) {
chmod($mg->path_to_gal.$name,0666);
$handleMessage = $mg->handleFile($name, $modx->db->getRecordCount($rsx));
if ($handleMessage != "") {
$manageOuterTplData['messages'] .= $handleMessage;
$upload_error = true;
}
}
EDIT:
And try changing the chmod line from:
Code:
chmod($mg->path_to_gal.$name,0666);
to:
Code:
chmod($modx->config['base_path'].$mg->path_to_gal.$name,0666);
And you can also try to add the $modx->config['base_path'] to the move_uploaded_file function call
webcomsystems:
Hey Doze, that last change worked!!!
I just did the first piece of code, not the CHMOD one and all is fine now.
Thanks a million for helping me with this.
Loving Maxigallery again! ;D
turtle_in_time:
it worked for me also, without using ftp commands. only changing the lines 371-378.
thanks doze!!!
/j
doze:
Okay, good.. I'll make sure that it gets to the next release too..
thehen:
Just a note to say this solved my problem, which I originally thought was to do with the Zeus web server.
http://modxcms.com/forums/index.php/topic,21996.0.html
Thanks! Lifesaver.
Navigation
[0] Message Index
[#] Next page
[*] Previous page