這是本文件的舊版!
自己架圖床
嘗試
-
- ✔ 下載 zip 檔並解壓縮到 NAS /web
- ✔ 照安裝說明,把 /inc/example.config.inc.php 的
example
拿掉 - http://ciangbrides.myds.me/pictshare/ 就可以上傳圖片了,預設大小上限為 32 MB
- 試著上傳第一個檔案,卻是破圖
PNG 不行,JPEG 也不行…… - 到 /inc/config.inc.php 中把 show error 改為 true,再上傳一次,就看到大量錯誤訊息:
Warning: fopen(/volume1/web/pictshare/upload/hashes.csv): failed to open stream: Permission denied in /volume1/web/pictshare/models/pictsharemodel.php on line 611 Warning: fwrite() expects parameter 1 to be resource, boolean given in /volume1/web/pictshare/models/pictsharemodel.php on line 612 Warning: fclose() expects parameter 1 to be resource, boolean given in /volume1/web/pictshare/models/pictsharemodel.php on line 613 Warning: file_put_contents(/volume1/web/pictshare/upload/4korzd1rih.jpg/4korzd1rih.jpg): failed to open stream: Permission denied in /volume1/web/pictshare/models/pictsharemodel.php on line 453 Warning: imagecreatefromjpeg(/volume1/web/pictshare/upload/4korzd1rih.jpg/4korzd1rih.jpg): failed to open stream: No such file or directory in /volume1/web/pictshare/models/pictsharemodel.php on line 458 Warning: imagejpeg() expects parameter 1 to be resource, boolean given in /volume1/web/pictshare/models/pictsharemodel.php on line 459 Warning: fopen(/volume1/web/pictshare/upload/uploads.txt): failed to open stream: Permission denied in /volume1/web/pictshare/models/pictsharemodel.php on line 464 Warning: fwrite() expects parameter 1 to be resource, boolean given in /volume1/web/pictshare/models/pictsharemodel.php on line 465 Warning: fclose() expects parameter 1 to be resource, boolean given in /volume1/web/pictshare/models/pictsharemodel.php on line 466 Warning: file_put_contents(/volume1/web/pictshare/upload/deletecodes/652gbi8g6cpi30shn63ji747z3l0u3h1): failed to open stream: Permission denied in /volume1/web/pictshare/models/pictsharemodel.php on line 479
八成又是權限問題
→ 在 NAS 中把 /web/pictshare(含所有子項目)的讀寫權限都設給使用者 http 及群組 http
→ 總算順利出現結果
- trebonius0/Photato: Photato - The personal Pictures gallery:直接對某資料夾索引,但需要 Java……
- UberGallery - The simple PHP photo gallery:也是直接吃資料夾,免資料庫 → 試用:
- 上傳至 NAS /web/ubergallery
- 開讀寫權限給使用者 http、群組 http
- 執行成功,待上傳圖片
- 上傳圖片
- 吃到單張照片
- 吃不到資料夾!似乎不是非英數名稱的問題 ← 啊,它本來就不以多資料夾相簿為主要功能
- → 放棄
-
- 上傳、開寫入權限給 http
- 初執行 ✔ → system check 後得知 thumbnail caching 還沒開 ← 哦,上傳圖片後就沒事了
- 吃單張 ✔ 吃資料夾 ✔
- 影片?
- 照片都是原圖連結
- 吃 symlink ✕
- 吃 hard link ✔(限單檔
)
討論區