您在這裡

FCKeditor上傳檔案問題!

cheonghoi's 的頭像
cheonghoi 在 2008-10-05 (周日) 20:44 發表

剛開始想用FCKeditor和IMCE想更靈活地發表文章,IMCE未進行過任何設定,只是一裝好就用FCKeditor開了upload檔妹功能,但上傳圖片時有以下錯誤,未知是那裏問題不能上傳檔案?
This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file

FCKeditor的設定檔那邊如果指定用imce來處理檔案上傳的話,FCKeditor原有的檔案上傳系統就會被停用。
兩者只能選一種來用喔。

選imce的話,就會在需要上傳檔案的地方多出一個「瀏覽伺服器端」的按鈕,點選就可開啟imce來處理檔案。
不選imce的話就可以在FCKeditor「上傳」的tab中上傳檔案。

tky

tky

因為之前是用timymce的 後來因為fckditor有內建file manager功能 所以改用fckeditor
如tky所說 你可以在內建功能或imce間擇一使用
兩者各有優劣
imce:可以預覽圖片 上傳時也可以選擇產生縮圖 但無法新增目錄 設定簡單
內建:不能預覽圖片 但能新增目錄 設定較繁瑣 要改很多地方(readme.txt裡有寫到)

上面大大言則我是否要disable 他們兩者之其中一個的功能,才可以用到另外一個的上傳呢?(不能同時使用嗎?)因為無論我用 "瀏覽伺服器端"或"upload"都彈相同的警告字句!

假設我想用FCKeditor的upload功能應該怎樣設置呢?到目前為止我還未能發佈flash格式,想快點完成。

如果你沒有啟用imce那就是使用內建上傳功能
如果啟用imce 那要到管理/網站設定/imce裡將imce取代內建上傳功能

How to enable the file browser
------------------------------
The editor gives the end user the flexibility to create a custom file browser that can be integrated on it.
The included file browser allows users to view the content of a specific directory on
the server and add new content to that directory (create folders and upload files).

1. To enable file browsing you need to edit the connector configuration file in your fckeditor module directory, the file should be in:

/drupal5/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php
(FCKeditor 2.5+)

or

/drupal5/modules/fckeditor/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
and
/drupal5/modules/fckeditor/fckeditor/editor/filemanager/upload/php/config.php
(FCKeditor 2.3.x - 2.4.x)

In this file(s) you will need to enable the file browser by adding one line that includes file with the special authentication function for Drupal (filemanager.config.php). Add this code:

require_once "../../../../../filemanager.config.php";
(FCKeditor 2.5+)

or

require_once "D:\\xampp\\htdocs\\drupal5\\modules\\fckeditor\\filemanager.config.php"
(FCKeditor 2.3.x - 2.4.x)

straight below this line:

$Config['UserFilesAbsolutePath'] = '' ;

The config.php file also holds some other important settings, please take a look at it and adjust it to your needs (optional).

2. As of Drupal 5.2, additional step is required: locate file named settings.php inside
your drupal directory (usually sites/default/settings.php) and set $cookie_domain variable to the appropiate domain (remember to uncomment that line). If you not do this, FCKeditor will claim that file browser is disabled
3. Enabling file uploads is a security risk. That's why you have to grant a separate permission to enable the file browser to certain groups.
4. Lastly, adjust the File browser settings for each profile.

Hi All
以下是我的作法,但失敗了
不要改那裡
請大家幫幫忙 感射

vim /var/www/html/drupal/sites/all/modules/wysiwyg/fckeditor/editor/filemanager/connectors/php/config.php

內容如下

$Config['Enabled'] = true ;

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/var/www/html/drupal/sites/image/' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful 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'] = '' ;
require_once "/var/www/html/drupal/sites/image/";

要create new Folder 時產生以下的錯誤訊息
The server didn't send back a proper XML response. Please contact your system administrator.

XML request error: OK (200)

Requested URL:
http://192.168.8.32/drupal/sites/all/modules/wysiwyg/fckeditor/editor/fi...

Response text:

Warning: require_once(/var/www/html/drupal/sites/image) [function.require-once]: failed to open stream: Resource temporarily unavailable in /var/www/html/drupal/sites/all/modules/wysiwyg/fckeditor/editor/filemanager/connectors/php/config.php on line 43

Fatal error: require_once() [function.require]: Failed opening required '/var/www/html/drupal/sites/image' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/drupal/sites/all/modules/wysiwyg/fckeditor/editor/filemanager/connectors/php/config.php on line 43

而upload 時 status 都是顯示
Upload a new file in this folder (Upload in progress, please wait...)

但都沒有動靜, 請問要如何修改呢
感謝各位

我安裝過~但是不用改到FCKeditor裡細部的檔案路徑。
你於drupal中的檔案系統的檔案系統路徑有設對嘛?

心中常存善解、包容、感思、知足、惜福 (靜思語錄)

人人把心中的愛發揮出來,就能凝聚善的福業,形成善的循環。 (靜思語錄)

樓上大魔王講的大概是.......

(1)針對你所示的error message:注意Resource temporarily unavailable ,表示沒有temporary file,所以,去看一下temporary file設定情形。
---------------error message
The server didn't send back a proper XML response. Please contact your system administrator.
XML request error: OK (200)
Requested URL:http://192.168.8.32/drupal/sites/all/modules/wysiwyg/fckeditor/editor/fi...
Response text:
Warning: require_once(/var/www/html/drupal/sites/image) [function.require-once]: failed to open stream: Resource temporarily unavailable
-----------------

check 一下<網站設定><檔案系統>,暫存目錄。
原本在local PC上做,因而暫存目錄為c:/xampp/tmp,移到主機上,是linux主機,就不行了,因此改成relative path,sites/default/tmp之類的。還沒試過(因為已將站台關了),應該是這問題吧。

(2)再check 一下"檔案系統路徑:",我是用sites/default/files這種relative path。不要用c:/xampp/tmp...之類的absolut path。
(3)我依照Using Drupal書上安裝FCKeditor + IMCE,可正確放入dirctory,及各directory均產生OK.
已將Using Drupal上步驟節譯於:
FCKeditor step by step

說不定有幫助。
Good luck。