fckeditor The server didn't send back a proper XML response.

WRInaute discret
Bonjour à tous,


J'utilise fckeditor pour un client qui veut modifier ses pages en ligne.

J'ai ce message d'erreur "Sorry, can't map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/browser/default/connectors/php/config.php".

Je vous avoue que je deviens dingue car cela fait une semaine que je passe mes journées et nuits à chercher la solution sans succès. Il y a des centaines de post dans des centaines de forums. Je l'ai ai tous fais et personne ne donne de réponse correctes. Ou alors c'est moi le problème.

REMARQUES IMPORTANTE :

Quand je suis sur internet sur mon site et que dans l'éditeur je fais afficher code source et que je tape moi-même le chemin vers l'image, CA MARCHE. Donc je ne comprends pas. Ca rssemble très fort à un problème de chemin.


Voici mes paramètres:

J'ai fckeditor 2.4.3.

Fichier fckeditor\editor\filemanager\browser\default\connectors\php\config.php

Code:
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/userfiles/' ;
$Config['UserFilesAbsolutePath'] = 'http://membres.lycos.fr/hxjonathan/userfiles/' ;

Fichier fckeditor\editor\filemanager\browser\default\connectors\php\connector.php

Code:
<?php

ob_start() ;

include('config.php') ;
include('util.php') ;
include('io.php') ;
include('basexml.php') ;
include('commands.php') ;

if ( !$Config['Enabled'] )
	SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/php/config.php" file' ) ;

// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '' ;

if ( isset( $Config['UserFilesPath'] ) )
	$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
else if ( isset( $_GET['ServerPath'] ) )
	$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
else
	$GLOBALS["UserFilesPath"] = '/userfiles/' ;

if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
	$GLOBALS["UserFilesPath"] .= '/' ;

if ( strlen( $Config['UserFilesAbsolutePath'] ) > 0 )
{
	$GLOBALS["UserFilesDirectory"] = $Config['UserFilesAbsolutePath'] ;

	if ( ! ereg( '/$', $GLOBALS["UserFilesDirectory"] ) )
		$GLOBALS["UserFilesDirectory"] .= '/' ;
}
else
{
	// Map the "UserFiles" path to a local directory.
	$GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ;
}

DoResponse() ;

function DoResponse()
{
	if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
		return ;

	// Get the main request informaiton.
	$sCommand		= $_GET['Command'] ;
	$sResourceType	= $_GET['Type'] ;
	$sCurrentFolder	= $_GET['CurrentFolder'] ;

	// Check if it is an allowed type.
	if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) )
		return ;

	// Check the current folder syntax (must begin and start with a slash).
	if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
	if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;

	// Check for invalid folder paths (..)
	if ( strpos( $sCurrentFolder, '..' ) )
		SendError( 102, "" ) ;

	// File Upload doesn't have to Return XML, so it must be intercepted before anything.
	if ( $sCommand == 'FileUpload' )
	{
		FileUpload( $sResourceType, $sCurrentFolder ) ;
		return ;
	}

	CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;

	// Execute the required command.
	switch ( $sCommand )
	{
		case 'GetFolders' :
			GetFolders( $sResourceType, $sCurrentFolder ) ;
			break ;
		case 'GetFoldersAndFiles' :
			GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
			break ;
		case 'CreateFolder' :
			CreateFolder( $sResourceType, $sCurrentFolder ) ;
			break ;
	}

	CreateXmlFooter() ;

	exit ;
}
?>
Fichier fckeditor\editor\filemanager\upload\php\config.php


Code:
global $Config ;

// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true ;

// Set if the file type must be considere in the target path.
// Ex: /userfiles/image/ or /userfiles/file/
$Config['UseFileType'] = true ;


// Path to uploaded 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'] = 'http://membres.lycos.fr/hxjonathan/userfiles/' ;

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

$Config['AllowedExtensions']['File']	= array() ;
$Config['DeniedExtensions']['File']		= array('html','htm','php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','htaccess','asis','sh','shtml','shtm','phtm') ;

$Config['AllowedExtensions']['Image']	= array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image']	= array() ;

$Config['AllowedExtensions']['Flash']	= array('swf','fla') ;
$Config['DeniedExtensions']['Flash']	= array() ;

?>



D'avance un grand merci. :D :D :D :D
 
WRInaute discret
Je tiens juste à précier que toutes les autres fonctionnalités de fckeditor. Le problème se pose que quand je dois accèder aux dossier et uploader.

Je fais ceci.

include("fckeditor/fckeditor.php") ;
connexion_DB('hxjonathan_db');

$reqlog = mysql_query("SELECT * FROM contenu_pages WHERE nom_page='papcadeaux'")or die(mysql_error());
$log=mysql_num_rows($reqlog);//on compte le nombre de ligne et ON met ce nombre dans la VARIABLE $log
$info_user=mysql_fetch_array($reqlog);
$essai=$info_user['contenu_page'];
?>

<form action="home.php?page=2225" method="post">
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = 'fckeditor/';
$oFCKeditor->Value = $essai;
$oFCKeditor->Width = '550' ;
$oFCKeditor->Height = '310' ;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Submit">
</form>
 
WRInaute impliqué
Re: fckeditor The server didn't send back a proper XML respo

hx.jonathan a dit:
// Path to uploaded 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'] = 'http://membres.lycos.fr/hxjonathan/userfiles/' ;

Tout est écrit pourtant en clair dans les commentaires (à condition d'être english-friendly) :
Chemin absolu, ça ne veut pas dire adresse http , ça correspond au chemin physique sur le serveur.
Tu peux te faire une idée de ce chemin en inspectant la variable $_SERVER["DOCUMENT_ROOT"]
 
WRInaute discret
j'obtiens ceci :

/data/members/free/multimania/fr/h/x/j/hxjonathan/htdocs/

J'ai donc mis ce chemin dans $Config['UserFilesAbsolutePath'] et j'ai toujours mon erreur.
 
WRInaute impliqué
Essaie d'ajouter le dossier userfiles/ quand même à la fin.
Et sinon en ne mettant rien ? car cette option est facultative.
ou la meme chose que pour l'option précédente ?
 
Discussions similaires
Haut