I'm getting this error whenever I click the 'Browse Server' button, when trying to insert an image. I have tried in IE7 and FF2 with exactly the same result.

I set up FCKeditor from the instructions in the ReadMe file: edited config.php and added the 'require_once' line, edited settings.php and updated $cookie_domain. Everything else seems to be working except browsing files on the server.

I'm sure I've missed something simple but I have no idea what it might be. Any help would be appreciated.

Comments

ZMan9854’s picture

Hmmm - same thing for me. I've been able to install the same module and FCKEditor library versions on two other servers without this problem.

It looks like the URL to the XML file is this:

http://www.example.com/sites/all/modules/fckeditor/fckeditor/editor/file...

This returns a 403 page. But when removing the 'Command' parameter, it looks like the page returns an XML file as expected, but of course we still need the 'Command' parameter passed as usual so this is no solution. Is Drupal trying to do something with that parameter for some reason?

Background info: I'm on AnHosting with PHP 5.2.3, and my other file uploads work (attachments, imagefield.module uploads, etc).

Thanks!

UPDATE: It looks like this issue is with my host. When dumping get_defined_vars() at the top of index.php, it looks like the page is already bound for 403. I see this string in the dump:

[HTTP_MOD_SECURITY_MESSAGE] => Access denied with code 403. Pattern match "&command=" at THE_REQUEST [msg "Temp fix for blocking includes from geosites "] [severity "EMERGENCY"]

Hope this helps others. Good luck!

I will contact AnHosting.

UPDATE 2:

An hosting says they can't disable the block on a shared hosting account. Alright then, to DreamHost I shall move... I would prefer to have shell access anyway!

UPDATE 3:

Well, here's an AnHosting proprietary solution - grep for 'Command=' in the filemanager folder and replace all references with something like Commandx. Then grep for $_GET['Command'] and replace all references. There are about six files to edit total. This seems to work well. Good luck!

atompkins’s picture

Status: Active » Closed (fixed)
alpekay’s picture

I was very happy to see this post as I am having the same issue getting FCKeditor to work on my AnHosting shared hosting account. I have followed
all installation instructions in FCKeditor readme.txt and have successfully configured it on my local test server, but on my live site at AnHosting I
get the xml error. I am using Drupal 6.2. I would really like to resolve this issue rather than having to move to a new host.

Can anyone explain how to get FCKeditor to work in AnHosting's shared environment? I see ZMan9854's instructions but I do not completely follow
them, as I am still learning. Any instructions you might be able to elaborate on would be very helpful.

Thank you.

wwalc’s picture

If you're having similar issue, ask your server administrator to turn of some specific mod security rules for your site.

vacilando’s picture

Version: 5.x-2.1 » 5.x-2.2-rc1
Status: Closed (fixed) » Needs review

When trying to browse in FCK I got this error:
The server didn't send back a proper XML response. Please contact your system administrator. XML request error: OK (200)

Everything was set up all right. I read hundreds of posts. It took days, but last night at 2am I've solved the damn problem.

Firstly, it was not one problem, but a set of various ones. The security rules as described above might be causing troubles. But not for me.

Note that people around the net who report the The server didn't send back a proper XML response. problem usually don't focus on the second part of the error message. In my case it said XML request error: OK (200). So I looked specifically for those posts.

Finally, this cryptic message put me on the right path. It was a compression thing!

In my settings.php I use ob_start("ob_gzhandler"); to save bandwidth and increase apparent speed. This compression collides with the XML generated from /modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php
Solution - open the above php and enter this line at the top: header('Content-Type: text/xml');

I am not sure but it might be that the same problem happens when Drupal caching is on.

Hope it helps somebody.

wwalc’s picture

@vacilando: thanks for posting this. Indeed it was not an easy thing to find.
I have another solution for it, could you test if it works for you?

Use the default version of conector.php and change the SetXmlHeaders() function in basexml.php.
Add the following:

  if (!function_exists('ob_list_handlers')) {
    @ob_end_clean();
    header("Content-Encoding: none");
  }
  else if ($handlers = sizeof(ob_list_handlers())) {
    while ($handlers--) {
      @ob_end_clean();
    }
    header("Content-Encoding: none");
  }

instead of:

ob_end_clean() ;

The old method assumed that there is only one output handler. The new code removes all output handlers returned by ob_list_handlers before sending the XML data. Removing all output before sending XML message is done intentionally. This way we get rid of all unnecessary empty characters that may appear after closing tag etc.
"Content-Encoding: none" is necessary to replace the "Content-Encoding: gzip" header.

point-1’s picture

In my case the problem was because folders "sites", "all" etc. up to "filemanager", "connectors".... and also the file "connector.php" were writable by group and they should not be writable by group, only by owner. So, use your FTP manager or shell access and change the permissions if that's the case.

coolo’s picture

I'm having a similar issue. I had FCKeditor working dandy on my development machine, but once transferred over to the production server, I received this same error. I have checked and double checked and tried many different iterations of variation of what the instructions tell you to do. I'm wondering if it is some XML functionality that my server does not contain? If so, does anyone have any idea of what it may be?

I'm not using ob_start in my settings.php

If anyone has any ideas, they would be appreciated.

Thanks in advance.

coolo’s picture

I got my issue figured out.
In my case, it was because I thought that the "/../../../../" in the line

require_once "../../../../../filemanager.config.php";

was supposed to be a place holder where I was supposed to write the actual directory path. However, once I added the line to the connector config file exactly as stated above per the instrtuctions(readme.txt), it worked perfectly.

TimG1’s picture

Version: 5.x-2.2-rc1 » 6.x-1.3-rc7
Status: Needs review » Active

I have the same issue with a slightly different error message. Where "basedir" below is my Drupal root.

==========================
The server didn't send back a proper XML response. Please contact your system administrator.

XML request error: OK (200)

Requested URL:
/basedir/sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/connector.php?ServerPath=%2Fbasedir%2Fsites%2Fall%2Ffiles&Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F&uuid=1233186849774

==========================

Should there be some http://www.mydomain.com at the beginning of the above line? Also, the error in Firebug says that the error is occurring at line 88 in browser.html file. Line 88 in browser.html is this....

if ( sServerPath.length > 0 )

I've tried what wwalc suggested in #6

if (!function_exists('ob_list_handlers')) {
    @ob_end_clean();
    header("Content-Encoding: none");
  }
  else if ($handlers = sizeof(ob_list_handlers())) {
    while ($handlers--) {
      @ob_end_clean();
    }
    header("Content-Encoding: none");
  }

That didn't change anything.

@wwalc: You say in #4 to "ask your server administrator to turn off some specific mod security rules for your site" I'm sorry, I'm not sure what that means though. What should I ask my server admin to turn on/off specifically?

I tried browsing to sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/test.html and seeing what that does. When I select Connector = PHP, Current Folder = /, any resource type, then click "Get Folders" or "Get Folders and Files" I get prompted to download connector.php. "You have chosen to open connector.php"

Also, I don't know if these two issues are related, but I posted this the other day. http://drupal.org/node/365378 That solution got me past the "You have chosen to open fckeditor.html" error message. But, not I get the incorrect XML response error message when trying to use the built in FCKeditor file browser.

Any help is always appreciated, I've been at this for most of the week now.

-Tim

TimG1’s picture

Status: Active » Closed (fixed)

I never did find out what the problem was for this.

I wound up installing http://drupal.org/project/imagebrowser and it seems to be working fine with that module.

-Tim

vako’s picture

Wow! ImageBrowser is a really cool option!! thank you very much for the suggestion, worked great and the error is irrelevant now.