1

我已经在 smarty 中创建了项目,现在我正在尝试将它托管在pagodabox.com上。我在 pagodabox.com 上创建了应用程序并将所有代码上传到此应用程序,但问题是现在我无法在 pagodabox.com 中配置缓存和编译器目录,这就是它输出胎儿错误的原因,因为缓存和编译器目录是只读模式。我尝试使用 Boxfile 解决此问题,但未能解决。我不知道如何使这些目录可写。请帮我。这是项目的网址,http://moviestock.pagodabox.com/以下是我的 Boxfile 配置

web1: #component type & number
  name: blog            #component settings
  shared_writable_dirs:
    - var/secured/cache
    - var/secured/compiler
    - var/sessions
  document_root: app
  php_version: 5.3.8

我收到以下错误:

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file   
shared/secured/compiler/wrt50c17dfaca2932.90478039' in 
/var/www/libs/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 
/var/www/libs/sysplugins/smarty_internal_template.php(201): 
Smarty_Internal_Write_File::writeFile('shared/secured/...', 'compileTemplateSource() #2  
/var/www/libs/sysplugins/smarty_internal_templatebase.php(374): 
Smarty_Internal_TemplateBase->fetch('extends:layout....', '6666cd76f969564...', NULL, 
NULL, true) #3 /var/www/classes/BaseController.php(22): Smarty_Internal_TemplateBase-
>display('extends:layout....', '6666cd76f969564...') #4 
/var/www/secured/controllers/HomeController.php(6): BaseController->render('home') #5 
[internal function]: HomeController->indexAction('') #6 
/var/www/classes/Router.php(26): call_user_func_array(Array, Array) #7 
/var/www/index.php(10): Router::run() #8 in 
/var/www/libs/sysplugins/smarty_internal_write_file.php on line 44 
4

2 回答 2

1

我认为这与 smarty 试图写入的文件路径有关。在错误中,文件路径是shared/secured/compiler/wrt50c17dfaca2932.90478039. 它应该是var/secured/compiler/wrt50c17dfaca2932.90478039

于 2013-01-29T19:12:34.350 回答
0

不确定,但也许@chmod(PATH,0770);会成功?

于 2013-01-26T20:36:34.290 回答