I wanted to install FCKeditorX and found that because my host uses open_basedir, CMSMS threw an error on uploading the xml file.
This was due to a call to 'file_get_contents( )' trying to directly access the uploaded file in the default PHP upload temp file directory which is out of my basedir path.
What should really happen is the that file is uploaded and then first moved using 'move_uploaded_file( )' into an accessible dir, then operated on from there.
So, the relevant code ( hack ) I have used is below ::
FILE :: admin/listmodules.php
Original Code line ( 110 ) ::
Code: Select all
$xml = file_get_contents( $file['tmp_name'] );
Code: Select all
$movedFileName = dirname( __FILE__ )."/../uploads/".$file['name'];
if( move_uploaded_file( $file['tmp_name'], $movedFileName ) ) {
$xml = file_get_contents( $movedFileName );
unlink( $movedFileName );
} else {
echo "<br /><br />Could not Move uploaded file from PHP's temp file upload area : \$_FILE VAR dump ::<br /><br />\n\n";
print_r($_FILES);
exit;
}
It is removed immediately after anyway.
Cheers.