netcommons / NetCommons2

NetCommons Version2
17 stars 21 forks source link

Azure環境でtemplates_c/の末尾スラッシュでエラー #108

Open RyujiAMANO opened 10 years ago

RyujiAMANO commented 10 years ago

[PHP_Warning]: include(D:\home\site\wwwroot\html\webapp/templates_c/\%2Finstall%2Ftemplates%2F^%%89^895^895F137A%%install_view_main_init.html.php): failed to open stream: No such file or directory in file D:\home\site\wwwroot\html\maple\smarty\Smarty.class.php line 1267 [PHP_Warning]: include(): Failed opening 'D:\home\site\wwwroot\html\webapp/templates_c/\%2Finstall%2Ftemplates%2F^%%89^895^895F137A%%install_view_main_init.html.php' for inclusion (include_path='D:/home/site/wwwroot/html;D:\home\site\wwwroot\html\webapp/components;D:/home/site/wwwroot/html/maple/includes/pear;.;C:\php\pear') in file D:\home\site\wwwroot\html\maple\smarty\Smarty.class.php line 1267

こんな感じでtemplates_c/\%2Finstallとなってる。 Smartyのcompile_dir指定時に末尾/がついてるのが原因。

webapp/config/maple.inc.php 48行目 define('SMARTY_COMPILE_DIR', WEBAPP_DIR . '/templates_c/'); を define('SMARTY_COMPILE_DIR', WEBAPP_DIR . '/templates_c'); としたらエラーが消えた。

この末尾スラッシュっていらないはずでは?(同じくSmarty使ってるXOOPSではいれてないです)

akagane99 commented 10 years ago

Azure環境以外のVPSとかでも問題なければ、pull Request投げるといいかもです。