[問題]Attachment Mod 無法偵測附加檔案大小

與 phpBB 2.0.x 相關主題。

版主: 版主管理群

回覆文章
頭像
jimmychu
星球普通子民
星球普通子民
文章: 3
註冊時間: 2003-02-23 05:40
來自: TAIPEI, TAIWAN
聯繫:

[問題]Attachment Mod 無法偵測附加檔案大小

文章 jimmychu »

問題外掛:Attachment Mod Version 2
參考連結:http://www.opentools.de/docs/user_guide.html
使用版本:Attachment Mod Version 2.3.6
網站位置:http://www.opentools.de/board/viewtopic ... 262&page=4
狀況描述: 無法偵測附加檔案大小

安裝完成後, 所有的功能都很正常, 而一般在個人資料和檔案的部份通常會有如下的資訊:
上傳配額:

0% 50% 100%
[已上傳檔案:0 位元組 / 配額限制:50 MB / 全部的 0%]

05.JPG
檔案描述: TEST

檔案大小: 0 位元組
瀏覽次數: 檔案已被下載 5 次
不過我的完全都沒有檔案大小的相關資訊, 這同時也代表, USER 在上傳任何大小的檔案系統都會認為是 0 BYTES.

那我設了一堆限制 USER 容量和檔案大小的設定不就完全沒有了嗎?

所以, 有沒有人有遇過這個問題, 可以解答一下為什麼它偵測不到檔案的大小咧?? :s

謝謝~!

補充:

沒有裝過別的 MOD, 這是第一個哩.
貼. 地. 飛. 行. 的. 阿. 米.
頭像
jimmychu
星球普通子民
星球普通子民
文章: 3
註冊時間: 2003-02-23 05:40
來自: TAIPEI, TAIWAN
聯繫:

Re: [問題]Attachment Mod 無法偵測附加檔案大小

文章 jimmychu »

我來自問自答了~!! :-o

OK. 我已經找到這個問題的解答了~!

原來這個問題在 USER GUIDE 裡就有了, 只是...
它太長了, 實在沒耐心看完, 而且又是英文, 真的蠻累的...

原文如下:

10.2 Could not attach File, but Post has been stored / Filesize is 0 all over the time

If you get the Error Message 'Could not Attach File. Post has been stored' after submitting your Post.

Either your Provider does not allow the function filesize(), which is very bad, because nothing can be done to solve the problem, or your Temporary PHP Directory is not setup properly.

(Only for people hosting their own Website)

Every Attachment uploaded to the board will go into the PHP Temporary Upload Directory.
Please check the Permissions of this Directory and make sure PHP is allowed to write to it.
For users using Apache/IIS on Windows, you might want to check the following Settings:

(Thanks to SFGrimoire :: complete thread about this error)

The IUSR_hostname account needs to have read/write access to the system temp directory, otherwise you will receive the following access failure:
Event Type: Failure Audit
Event Source: Security
Event Category: Object Access
Event ID: 560
Date: 9/16/2002
Time: 12:05:52 PM
User: W2KNCHTNPC\IUSR_W2KNCHTNPC
Computer: W2KNCHTNPC
Description:
Object Open:
Object Server: Security
Object Type: File
Object Name: C:\WINNT\Temp
New Handle ID: -
Operation ID: {0,450981}
Process ID: 812
Primary User Name: W2KNCHTNPC$
Primary Domain: AFS
Primary Logon ID: (0x0,0x3E7)
Client User Name: IUSR_W2KNCHTNPC
Client Domain: W2KNCHTNPC
Client Logon ID: (0x0,0x61349)
Accesses SYNCHRONIZE
ReadData (or ListDirectory)

Privileges -


The specific permissions required are:
hostname\IUSR_hostname:(OI)(CI)(special access:)
DELETE
READ_CONTROL
SYNCHRONIZE
FILE_READ_DATA
FILE_WRITE_DATA
FILE_APPEND_DATA
FILE_EXECUTE


Also, if you change the upload directory in php.ini the IUSR_hostname account needs the same permissions.
=====================================
它的意思就是說:

在 PHP 下會有一個設定是設定 PHP 在上傳檔案時的暫存目錄位置.
在 PHP.INI 中, 如果是 WINDOWS 的使用者則應該在 C:\WINNT\PHP.INI

(沒有設定的話則會使用 WINDOWS 的預設值, 小弟建議大家還是設定一下好了, 因為這個 資料夾等一下要改權限, 還是分開的好 )

在這一行改一下, 如下: (C:\WINNT\PHP.INI)
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = C:\PHP\ul_temp

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
就是那個 upload_tmp_dir = 的地方, 設定之前可別忘了先去新增一毎子目錄唷~再在這個地方填入你新增的位址.

然後到這個新增的 資料夾 選擇 "內容" 更改權限, 這個資料夾的使用者加入一個 "IUSR_你的SERVER名稱" 的使用者, 給這個 使用者 "讀取" 及 "寫入" 的權限, 就 OK 了.

很簡單吧~ :-D

貼. 地. 飛. 行. 的. 阿. 米.
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

文章 動機不明 »

做的很好呀 :D
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
回覆文章

回到「2.0」