无法在pagodabox上为smarty项目写缓存文件夹

时间:2012-12-07 05:28:03

标签: php smarty3 server-configuration

我已经在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 

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

不确定,但@chmod(PATH,0770);可能会成功吗?