推 water2924:看一下templates_c資料夾中compile出來的那個php 第27行 02/21 23:05
→ water2924:可能是smarty產生出來的code跟你系統衝突了 (亂猜) 02/21 23:06
推 water2924:另,你php檔第9行參數錯誤喔 @@ assign() 裡面要有值 02/21 23:10
謝謝~我拿掉assign()
但是還是error
我附上完整訊息
2013-02-22 11:03:27: (mod_fastcgi.c.2676)
FastCGI-stderr: PHP Fatal error: Uncaught exception
'SmartyException' with message 'unable to write file
/opt/share/www/blog/templates_c/wrt5126dffff0a212.1/-42+3,'
in /opt/share/www/blog/class/sysplugins/smarty_internal_write_file.php:44
很困惑的是我按照官網步驟
chown nobody:nobody /opt/share/www/blog/templates_c/
chmod 770 /opt/share/www/blog/templates_c/
chown nobody:nobody /opt/share/www/blog/cache/
chmod 770 /opt/share/www/blog/cache/
也用testInstall() 來測試Smarty是否有權限讀寫這些目錄。
還是不懂哪裡出錯?
※ 編輯: pttnews 來自: 59.120.175.188 (02/22 11:09)
推 water2924:試試看 chmod 777 吧 02/22 11:13
事實上我也試過了
囧
※ 編輯: pttnews 來自: 59.120.175.188 (02/22 11:25)
→ twsphere:結案 775 ! 02/22 11:52
測過了~
感謝twsphere 、 water2924 大德~
我在此留下紀錄,供人參考
軟體環境 PHP Version 5.2.17 + SMARTY 3.1.13
硬體 asus rt-16n
OS Tomato linux
Smarty 經測試出現
Uncaught exception 'SmartyException' with message 'unable to write file
當初官網說
chown nobody:nobody /opt/share/www/blog/templates_c/
chmod 770 /opt/share/www/blog/templates_c/
chown nobody:nobody /opt/share/www/blog/cache/
chmod 770 /opt/share/www/blog/cache/
就算用testInstall() 來測試Smarty是否有權限讀寫這些目錄,事實上也不準確
要改為chmod 775 才可以
PS: 我一剛開始 chmod 777, 試過不行,現在回想,也許是沒搭配chown nobody:nobody
※ 編輯: pttnews 來自: 59.120.175.188 (02/22 12:05)