KFM assumes the PHP session name is always PHPSESSID and doesn't pass on the correct PHP session name to SWFUpload. Therefore the session will be lost on file uploads with SWFUpload if the session name wasn't PHPSESSID.
The following patch solves this issue:
kfm-r980-phpsession_name_post_parameter.patch
Index: trunk/j/panels.js
===================================================================
--- trunk/j/panels.js (Revision 980)
+++ trunk/j/panels.js (Arbeitskopie)
@@ -147,14 +147,15 @@
c.innerHTML=' ';
// }
setTimeout(function(){ // delay the creation of the swfupload object, until the browser registers #swfupload_browse_button
+ var post_params = {
+ "swf" : 1,
+ "kfm_session": window.session_key
+ };
+ post_params[window.phpsession_name] = window.phpsession_id;
window.swfUpload = new SWFUpload({
// { Backend Settings
upload_url: "upload.php", // Relative to the SWF file or absolute
- post_params: {
- "PHPSESSID" : window.phpsession,
- "swf" : 1,
- "kfm_session": window.session_key
- },
+ post_params: post_params,
// }
// { File Upload Settings
file_size_limit : "9999 MB", // 2MB
Index: trunk/index.php
===================================================================
--- trunk/index.php (Revision 980)
+++ trunk/index.php (Arbeitskopie)
@@ -188,7 +188,8 @@
version:'<?php echo KFM_VERSION; ?>'
};
var kfm_widgets=[];
- var phpsession = "<?php echo session_id(); ?>";
+ var phpsession_name = "<?php echo session_name(); ?>";
+ var phpsession_id = "<?php echo session_id(); ?>";
var session_key="<?php echo $kfm_session->key; ?>";
var starttype="<?php echo isset($_GET['type'])?$_GET['type']:''; ?>";
var fckroot="<?php echo $kfm->setting('userfiles_address'); ?>";