v 2.10.10 Upload XML Error

Discuss, research, share, find, and solve bugs

v 2.10.10 Upload XML Error

Postby OutToLunch » 8:18pm, Mon 11 May, 2009

Just upgraded to v 2.10.10 and getting a new error. It pops up when I click on image icon and then click the grey "Browse Server" button for uploading images. A window named "FCKeditor - Resources Browser" pops up and then a big gray box comes up over top of that. I'm using FireFox 3.0.10.

Below is the full text. I replaced the domain name with a generic name, but the rest is the same.


Code: Select all
The server didn't send back a proper XML response. Please contact your system administrator.

XML request error: OK (200)

Requested URL:
http://www.domain.com/mailinglist/admin/FCKeditor/editor/filemanager/connectors/phplist/connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F&uuid=1242072361783

Response text:
<br />
<b>Fatal error</b>:  Call to undefined function  senderror() in <b>/home/domain/public_html/mailinglist/admin/FCKeditor/editor/filemanager/connectors/phplist/config.php</b> on line <b>31</b><br />


If I say OK to this box it goes away but the current images that I know are available are not show in the resource browser. I didn't see this issue referenced anywhere here yet, but maybe I missed it. Any clues?

Currently using PHP 5.2.6 and did not have this issue with PHPlist v 2.10.7 where uploading worked fine and I did not get this XML error. Help is very much appreciated. Thank you!
OutToLunch
phpList newbie
 
Posts: 4
Joined: 8:03pm, Mon 11 May, 2009

Re: v 2.10.10 Upload XML Error

Postby OutToLunch » 6:19pm, Wed 13 May, 2009

Just wanted to follow up with a screen shot to help explain. This pops up as soon as I click on "Browse Server" from the edit image dialog.

phplist-error.jpg
phplist-error.jpg (234.78 KiB) Viewed 65435 times


Anybody experiencing this?

Thank you!
Last edited by OutToLunch on 1:23pm, Fri 15 May, 2009, edited 1 time in total.
OutToLunch
phpList newbie
 
Posts: 4
Joined: 8:03pm, Mon 11 May, 2009

Re: v 2.10.10 Upload XML Error

Postby H2B2 » 9:45pm, Thu 14 May, 2009

Have you tried looking for leads in the FCKeditor forum?
e.g.: http://www.fckeditor.net/forums/viewtop ... 10&t=11924

BTW, the image you posted still contains your domain in the upper bar. If you want to keep that private, you'd need to edit that image.

Edit: Just found one other user reporting a similar issue: viewtopic.php?p=62080#p62080
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: v 2.10.10 Upload XML Error

Postby OutToLunch » 1:24pm, Fri 15 May, 2009

I edited the image, thank you. And I'll check out your links, appreciate the help.
OutToLunch
phpList newbie
 
Posts: 4
Joined: 8:03pm, Mon 11 May, 2009

Re: v 2.10.10 Upload XML Error

Postby OutToLunch » 5:36pm, Fri 15 May, 2009

Unfortunately nothing at those links seems to get at the root issue that I can figure out. So, I assume this isn't happening to everybody? That makes me think it has to do with the underlying PHP version and/or how it was built. I also can confirm this happens in recent versions of both FireFox and MSIE.

I can also confirm that it doesn't seem to have anything to do with there being strange characters in files that the browser is trying to list (as was suggested at the FCKeditor forum). It happens even if the upload folder is empty.
OutToLunch
phpList newbie
 
Posts: 4
Joined: 8:03pm, Mon 11 May, 2009

Re: v 2.10.10 Upload XML Error

Postby spiro » 5:09pm, Tue 19 May, 2009

Hi all,

I'm getting these issues with the FCKEditor Image upload too.

I implemented the newer FCKeditor when I upgraded PHPList to 2.10.9 but had to edit the following code with some example that was on FCKeditor's web site as the following config file in PHPList was geared to the older version of FCKEditor.

This is the previous post thread which included the link to the info mentioned above on FCKeditor's website.
viewtopic.php?f=24&t=23715

v2.10.10
admin/FCKeditor/editor/filemanager/connectors/phplist/config.php

v2.10.9
admin/FCKeditor/editor/filemanager/connectors/php/config.php

The latest version of this config file uses a different approach to set $Config['Enabled'] = true

At first I thought this might be due to me having an error in the PHPList config file, check that you don't have a trailing "/" in the following part of the PHPList config file;

define("FCKIMAGES_DIR","attachments");

The code in the FCKeditor connectors config file already appends a "/" to whatever folder you've defined above.

Anyway having corrected that I'm still getting this issue. In fact I'm not convinced that the definition of $Config['UserFilesPath'] and $Config['UserFilesAbsolutePath'] are correct in this latest version of the FCKeditor connectors config file. The reason I say this is because when I implemented this in v2.10.9 I found that the links to the images didn't point to the correct location on the web server, resulting in broken image links in the body of the message.

I think the following two in the connectors config.php file should be something like this... obviously tailored to your folder names.

$Config['UserFilesPath'] = 'http://www.yourdomain.co.uk/lists/attachments/' ;
$Config['UserFilesAbsolutePath'] = '/home/hostaccountname/public_html/mywebfolder/lists/attachments/' ;

My 2.10.10 version of FCKeditor connectors config file now looks like this, am not sure this is setting $Config['Enabled'] = true though? Also server browse error appears to relate to a permissions issue with another file in the admin/FCKeditor/editor/filemanager/connectors/phplist/ folder called connector.php.

I also found that editing the QuickUploadPath and QuickUploadAbsolutePath resource type configuration statements at the end of the code below gives a better experience with the server folder browser once it's working.

Hopefully someone else that's also looking at this issue can add some more findings, I think permissions on admin/FCKeditor/editor/filemanager/connectors/phplist/ or the connector.php file in this folder could be the beginnings of an answer to this?

Code: Select all

<?php
/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * Configuration file for the File Manager Connector for PHP.
 */

global $Config ;
if (isset($_SERVER["ConfigFile"]) && is_file($_SERVER["ConfigFile"])) {
  include $_SERVER["ConfigFile"];
} elseif (is_file('../../../../../../../../config/config.php')) {
  include "../../../../../../../../config/config.php";
} else {
  SendError( 1, 'unable to load phplist config file' );
  print "Error, cannot find config file\n";
  exit;
}
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
if (!defined('FCKIMAGES_DIR') && !defined('UPLOADIMAGES_DIR')) {
  $Config['Enabled'] = false;
} elseif (defined('UPLOADIMAGES_DIR')) {
  $imgdir = $_SERVER['DOCUMENT_ROOT'].'/'.UPLOADIMAGES_DIR.'/';
  $Config['Enabled'] = is_dir($imgdir) && is_writeable ($imgdir);
  $Config['UserFilesPath'] = '/'.UPLOADIMAGES_DIR.'/' ;
} else {
  $imgdir = $_SERVER['DOCUMENT_ROOT'].$GLOBALS['pageroot'].'/'.FCKIMAGES_DIR.'/';
  $Config['Enabled'] = is_dir($imgdir) && is_writeable ($imgdir);
  // Path to user files relative to the document root.
  if (!preg_match('#/$#',$GLOBALS["pageroot"])) {
    $GLOBALS["pageroot"] = $GLOBALS["pageroot"] . '/';
  }
  $Config['UserFilesPath'] = 'http://www.yourdomain.co.uk/'.$GLOBALS["pageroot"].FCKIMAGES_DIR.'/' ;
}

// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
//      authenticated users can access this file or use some kind of session checking.

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/home/hostaccountname/public_html/mywebfolder/lists/attachments/' ;

// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.
$Config['ForceSingleExtension'] = true ;

// Perform additional checks for image files.
// If set to true, validate image size (using getimagesize).
$Config['SecureImageUploads'] = true;

// What the user can do with this connector.
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;

// Allowed Resource Types.
$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;

// For security, HTML is allowed in the first Kb of data for files having the
// following extensions only.
$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;

// After file is uploaded, sometimes it is required to change its permissions
// so that it was possible to access it at the later time.
// If possible, it is recommended to set more restrictive permissions, like 0755.
// Set to 0 to disable this feature.
// Note: not needed on Windows-based servers.
$Config['ChmodOnUpload'] = 0644 ;

// See comments above.
// Used when creating folders that does not exist.
$Config['ChmodOnFolderCreate'] = 0755 ;

/*
   Configuration settings for each Resource Type

   - AllowedExtensions: the possible extensions that can be allowed.
      If it is empty then any file type can be uploaded.
   - DeniedExtensions: The extensions that won't be allowed.
      If it is empty then no restrictions are done here.

   For a file to be uploaded it has to fulfill both the AllowedExtensions
   and DeniedExtensions (that's it: not being denied) conditions.

   - FileTypesPath: the virtual folder relative to the document root where
      these resources will be located.
      Attention: It must start and end with a slash: '/'

   - FileTypesAbsolutePath: the physical path to the above folder. It must be
      an absolute path.
      If it's an empty string then it will be autocalculated.
      Useful if you are using a virtual directory, symbolic link or alias.
      Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
      Attention: The above 'FileTypesPath' must point to the same directory.
      Attention: It must end with a slash: '/'

    - QuickUploadPath: the virtual folder relative to the document root where
      these resources will be uploaded using the Upload tab in the resources
      dialogs.
      Attention: It must start and end with a slash: '/'

    - QuickUploadAbsolutePath: the physical path to the above folder. It must be
      an absolute path.
      If it's an empty string then it will be autocalculated.
      Useful if you are using a virtual directory, symbolic link or alias.
      Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
      Attention: The above 'QuickUploadPath' must point to the same directory.
      Attention: It must end with a slash: '/'

       NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
       "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
       This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
       Example: if you click on "image button", select "Upload" tab and send image
       to the server, image will appear in FCKeditor correctly, but because it is placed
       directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
       The more expected behaviour would be to send images directly to "image" subfolder.
       To achieve that, simply change
         $Config['QuickUploadPath']['Image']         = $Config['UserFilesPath'] ;
         $Config['QuickUploadAbsolutePath']['Image']   = $Config['UserFilesAbsolutePath'] ;
      into:
         $Config['QuickUploadPath']['Image']         = $Config['FileTypesPath']['Image'] ;
         $Config['QuickUploadAbsolutePath']['Image']    = $Config['FileTypesAbsolutePath']['Image'] ;

*/

$Config['AllowedExtensions']['File']   = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
$Config['DeniedExtensions']['File']      = array() ;
$Config['FileTypesPath']['File']      = $Config['UserFilesPath'] . 'file/' ;
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
$Config['QuickUploadPath']['File']      = $Config['FileTypesPath']['File'] ;
$Config['QuickUploadAbsolutePath']['File']= $Config['FileTypesAbsolutePath']['File'] ;

$Config['AllowedExtensions']['Image']   = array('bmp','gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image']   = array() ;
$Config['FileTypesPath']['Image']      = $Config['UserFilesPath'] . 'image/' ;
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
$Config['QuickUploadPath']['Image']      = $Config['FileTypesPath']['Image'] ;
$Config['QuickUploadAbsolutePath']['Image']= $Config['FileTypesAbsolutePath']['Image'] ;

$Config['AllowedExtensions']['Flash']   = array('swf','flv') ;
$Config['DeniedExtensions']['Flash']   = array() ;
$Config['FileTypesPath']['Flash']      = $Config['UserFilesPath'] . 'flash/' ;
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
$Config['QuickUploadPath']['Flash']      = $Config['FileTypesPath']['Flash'] ;
$Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolutePath']['Flash'] ;

$Config['AllowedExtensions']['Media']   = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
$Config['DeniedExtensions']['Media']   = array() ;
$Config['FileTypesPath']['Media']      = $Config['UserFilesPath'] . 'media/' ;
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
$Config['QuickUploadPath']['Media']      = $Config['FileTypesPath']['Media'] ;
$Config['QuickUploadAbsolutePath']['Media']= $Config['FileTypesAbsolutePath']['Media'] ;

?>

As of July 2011
using the following on a shared Linux host:


PHPList: v2.10.14,FCKeditor: 2.6.3 (as distributed with phpList),PHP: 5.2.14,PHPMailer: ??,Apache: 2.2.11with OpenSSL enabled.
spiro
PL Geek
 
Posts: 50
Joined: 7:37pm, Thu 29 Jan, 2009

Re: v 2.10.10 Upload XML Error

Postby spiro » 12:05pm, Wed 20 May, 2009

Hey all,

Done a bit more digging, not found the answer yet but did find these differences between implementing this before in v2.10.9. I notice now that lists/admin/FCKeditor/editor/fckeditor.html now refers to the base configuration java script here lists/admin/fckphplist.php whereas previously this was lists/admin/FCKeditor/fckconfig.js

Therefore perhaps there is something in fckphplist.php that needs changing. I did notice that this looks like it takes account of the url that i mentioned in previous post, so I have changed the following line back to how it was in lists/admin/FCKeditor/editor/filemanager/connectors/phplist/config.php

was;
$Config['UserFilesPath'] = 'http://www.yourdomain.co.uk/'.$GLOBALS["pageroot"].FCKIMAGES_DIR.'/' ;

now back to;
$Config['UserFilesPath'] = $GLOBALS["pageroot"].FCKIMAGES_DIR.'/' ;

Hope someone can shed some more light on this, I also tried removing my directory password protection from the admin folder as i thought maybe the permissions issue reported in the xml error might have been because of that but unfortunately no such luck.

Regards
Spiro
As of July 2011
using the following on a shared Linux host:


PHPList: v2.10.14,FCKeditor: 2.6.3 (as distributed with phpList),PHP: 5.2.14,PHPMailer: ??,Apache: 2.2.11with OpenSSL enabled.
spiro
PL Geek
 
Posts: 50
Joined: 7:37pm, Thu 29 Jan, 2009

Re: v 2.10.10 Upload XML Error

Postby azero » 10:29am, Wed 03 Jun, 2009

Hello,
I found error in FCKeditor's connector config.
Problem is in _path_to_phpmailer_/admin/FCKeditor/editor/filemanager/connectors/phplist/config.php

There is relative path and include to phpList config (line 28, 29):
<...>
Code: Select all
} elseif (is_file('../../../../../../../../config/config.php')) {
  include "../../../../../../../../config/config.php";

<...>

This path is not valid. It should be two directories up less.
Changed to:
<...>
Code: Select all
} elseif (is_file('../../../../../../config/config.php')) {
  include "../../../../../../config/config.php";

<...>
And eveything went fine.

Btw, there is also no such function SendError(); defined, so we get error "undefined function senderror()" Instead of Error, cannot find config file.

Hope it helps.
azero
phpList newbie
 
Posts: 1
Joined: 10:14am, Wed 03 Jun, 2009

Re: v 2.10.10 Upload XML Error

Postby spiro » 1:17pm, Wed 03 Jun, 2009

Hi

Thanks for your response on the path issue, i think perhaps its your post that I came across in mantis but am still not getting past the xml error.

http://mantis.phplist.com/view.php?id=15297

Have found this thread which suggests that it could also relate to an issue with .htaccess file so am just trying to get some clarification on which .htaccess file is being referred to here...

viewtopic.php?f=24&t=24777

Thanks
As of July 2011
using the following on a shared Linux host:


PHPList: v2.10.14,FCKeditor: 2.6.3 (as distributed with phpList),PHP: 5.2.14,PHPMailer: ??,Apache: 2.2.11with OpenSSL enabled.
spiro
PL Geek
 
Posts: 50
Joined: 7:37pm, Thu 29 Jan, 2009

Re: v 2.10.10 Upload XML Error

Postby rjc » 11:23am, Tue 30 Jun, 2009

I want to confirm that azero's solution worked for me. I too was getting XML Error 200 when browsing for an image on the server after installing phplist v2.10.10. Also, when I tried to upload an image, it "hung", never uploading anything, and hanging (or freezing) in the process.

I made the changes to _path_to_phpmailer_/admin/FCKeditor/editor/filemanager/connectors/phplist/config.php as per azero's suggestion, and it fixed the issue of XML Error 200 and "hanging" when I tried to upload an image. Everything's sweet now.

A note to spiro: The XML Error you are getting is a different one to the one that OutToLunch and azero were talking about... I notice that your XML Error is 403, while OutToLunch (and azero, and mine), was XML Error 200, so it seems like yours has a different cause than this.
rjc
PL Nut
 
Posts: 28
Joined: 10:57pm, Mon 11 Dec, 2006

Re: v 2.10.10 Upload XML Error

Postby endjo » 2:54am, Thu 17 Sep, 2009

very useful, thanks azero
endjo
PL Nut
 
Posts: 18
Joined: 6:52pm, Mon 31 Aug, 2009

Re: v 2.10.10 Upload XML Error

Postby theahaak » 10:15am, Mon 16 Nov, 2009

Hello Azero,
I had the same error and thanks to your solution it's gone and working!
thanks again.

Thea
theahaak
phpList newbie
 
Posts: 1
Joined: 6:09am, Fri 06 Nov, 2009

Re: v 2.10.10 Upload XML Error

Postby Shamray » 10:39am, Sat 07 May, 2011

yes, i am veru grateful! it is great a work!!
Shamray
phpList newbie
 
Posts: 1
Joined: 5:12pm, Thu 05 May, 2011

Re: v 2.10.10 Upload XML Error

Postby spiro » 11:43am, Wed 27 Jul, 2011

This may also relate to .htaccess file in /lists which I made a post about here...

viewtopic.php?f=6&t=23394&start=60
As of July 2011
using the following on a shared Linux host:


PHPList: v2.10.14,FCKeditor: 2.6.3 (as distributed with phpList),PHP: 5.2.14,PHPMailer: ??,Apache: 2.2.11with OpenSSL enabled.
spiro
PL Geek
 
Posts: 50
Joined: 7:37pm, Thu 29 Jan, 2009


Return to Bug Discussion

Who is online

Users browsing this forum: No registered users and 2 guests