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
Fichier fckeditor\editor\filemanager\browser\default\connectors\php\connector.php
Fichier fckeditor\editor\filemanager\upload\php\config.php
D'avance un grand merci.

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 ;
}
?>
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.



