Log in or register to post comments
Last post
chrisfck's picture
Joined: 14/04/2008
Posts: 1
can't upload images
Hello,

I've been trying to configure fckeditor to uplaod image without success :(

I try it on my local server but it seems that upload is not working.

Here is my file organisation:
<file> index.php
<dir> fckeditor
<dir> images <dir>fiches

And now my script configuration:

<?php
include_once("fckeditor/fckeditor.php");
?>
<form method="post" action="" enctype="multipart/form-data">
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = './fckeditor/' ;
$oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
$oFCKeditor->ImageBrowser = true;
$oFCKeditor->ImageBrowserURL = './images/fiches/';
$oFCKeditor->ImageUpload = true;
$oFCKeditor->ImageUploadURL = './images/fiches/';
$oFCKeditor->Create() ;
?>
<input type="submit" value="envoyer">
</form>

When I try to upload an image, nothing happens after I click the upload image button.
If I try to use the file browser button I receive the following error: "This connector is disabled, Please check editor/filemanager/php/config.php file"

What Do I need to change to make it work ??

Thanks.
wiktor's picture
Joined: 16/07/2007
Posts: 1642
Re: can't upload images
First of all, don't use:
$oFCKeditor->ImageBrowser = true;

to change configuration options other that:
      $this->BasePath      = '/fckeditor/' ;
      $this->Width      = '100%' ;
      $this->Height      = '200' ;
      $this->ToolbarSet   = 'Default' ;
      $this->Value      = '' ;

because it will not work.
Use Config array:
$oFCKeditor->Config['ImageBrowser']
instead.

Second:
$oFCKeditor->ImageBrowserURL = './images/fiches/';

seems to be wrong, take a look at fckconfig.js to see how the path should look like.

And finally the answer to your question:
open editor\filemanager\connectors\php\config.php and adjust it to your needs (at least change $Config['Enabled'] setting).

Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+