Witam Spędziłem już kilka godzin na szukaniu rozwiązania tego problemu i nigdzie nie mogę znaleźć. Mianowicie Gdy próbuję dodać zdjęcie przez edytor fckeditor, po kliknięciu w przycisk "przeglądaj" pojawia się okienko z następującym komunikatem.
The server didn't send back a proper XML response. Please contact your system administrator. XML request error: OK (200) Requested URL: http://localhost/AntradeCMS/fckeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFolde rsAndFiles&Type=Image&CurrentFolder=%2F Response text: <%@ CodePage=65001 Language="VBScript"%> <% Option Explicit Response.Buffer = True %> <!-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2007 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 == * * This is the File Manager Connector for ASP. --> <!--#include file="config.asp"--> <!--#include file="util.asp"--> <!--#include file="io.asp"--> <!--#include file="basexml.asp"--> <!--#include file="commands.asp"--> <!--#include file="class_upload.asp"--> <% If ( ConfigIsEnabled = False ) Then SendError 1, "This connector is disabled. Please check the ""editor/filemanager/browser/default/connectors/asp/config.asp"" file"
End If ' Get the "UserFiles" path. Dim sUserFilesPath If ( Not IsEmpty( ConfigUserFilesPath ) ) Then sUserFilesPath = ConfigUserFilesPath If ( Right( sUserFilesPath, 1 ) <> "/" ) Then sUserFilesPath = sUserFilesPath & "/" End If Else sUserFilesPath = "/userfiles/" End If ' Map the "UserFiles" path to a local directory. Dim sUserFilesDirectory sUserFilesDirectory = Server.MapPath( sUserFilesPath ) If ( Right( sUserFilesDirectory, 1 ) <> "\" ) Then sUserFilesDirectory = sUserFilesDirectory & "\" End If DoResponse Sub DoResponse() Dim sCommand, sResourceType, sCurrentFolder ' Get the main request information. sCommand = Request.QueryString("Command") If ( sCommand = "" ) Then Exit Sub sResourceType = Request.QueryString("Type") If ( sResourceType = "" ) Then Exit Sub sCurrentFolder = Request.QueryString("CurrentFolder") If ( sCurrentFolder = "" ) Then Exit Sub ' Check if it is an allower resource type. if ( Not IsAllowedType( sResourceType ) ) Then Exit Sub ' Check the current folder syntax (must begin and start with a slash). If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/" If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder ' Check for invalid folder paths (..) If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sResourceType, ".." ) <> 0 ) Then SendError 102, "" End If ' File Upload doesn't have to Return XML, so it must be intercepted before anything. If ( sCommand = "FileUpload" ) Then FileUpload sResourceType, sCurrentFolder Exit Sub End If SetXmlHeaders CreateXmlHeader sCommand, sResourceType, sCurrentFolder ' Execute the required command. Select Case sCommand Case "GetFolders" GetFolders sResourceType, sCurrentFolder Case "GetFoldersAndFiles" GetFoldersAndFiles sResourceType, sCurrentFolder Case "CreateFolder" CreateFolder sResourceType, sCurrentFolder End Select CreateXmlFooter Response.End End Sub Function IsAllowedType( resourceType ) Dim oRE Set oRE = New RegExp oRE.IgnoreCase = True oRE.Global = True oRE.Pattern = "^(File|Image|Flash|Media)$" IsAllowedType = oRE.Test( resourceType ) Set oRE = Nothing End Function %>
Dodam, że w pliku: \fckeditor\editor\filemanager\browser\default\connectors\php\config.php mam ustawione wpisy w ten sposób:
// SECURITY: You must explicitelly enable this "connector". (Set it to "true"). $Config['Enabled'] = true ;
// Path to user files relative to the document root. $Config['UserFilesPath'] = '/userfiles/' ;
Gdzieś czytałem, że w pliku fckeditor\fckconfig.js można trzeba zastosować takie ustawienie dla następujących wpisów:
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
Ale nic z tych rzeczy nie pomaga. Jeżeli ktoś miał podobny problem i udało mu się rozwiązać bardzo proszę o pomoc. Z góry dziękuję
Nie wiem czy dobrze zrozumiałem, ale zrobiłem w ten sposób
// SECURITY: You must explicitelly enable this "connector". (Set it to "true"). $Config['Enabled'] = true ;
// Path to user files relative to the document root. $Config['UserFilesPath'] = '/userfiles/' ;
// Fill the following value it you prefer to specify the absolute path for the // user files directory. Usefull 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'] = 'C:/wamp/www/AntradeCMS/fckeditor/editor/userfiles/' ;
Niestety błąd dalej się pojawia
W ten sposób też nie działa
// SECURITY: You must explicitelly enable this "connector". (Set it to "true"). $Config['Enabled'] = true ;
// Path to user files relative to the document root. $Config['UserFilesPath'] = 'C:/wamp/www/AntradeCMS/fckeditor/editor/userfiles/' ;
// Fill the following value it you prefer to specify the absolute path for the // user files directory. Usefull 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'] = 'C:/wamp/www/AntradeCMS/fckeditor/editor/userfiles/' ;