We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I think this is more permissions problems. I upgraded to 2.0.5, but trying to visit the manager login I get this:

    Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file ' in /path/to/revo/core/model/smarty/sysplugins/smarty_internal_write_file.php:35 Stack trace: #0 /path/to/revo/core/model/smarty/sysplugins/smarty_internal_template.php(271): Smarty_Internal_Write_File::writeFile('/Users/everett2...', '<?php /* Smarty...', Object(modSmarty)) #1 /path/to/revo/core/model/smarty/sysplugins/smarty_internal_template.php(412): Smarty_Internal_Template->compileTemplateSource() #2 /path/to/revo/core/model/smarty/sysplugins/smarty_internal_template.php(554): Smarty_Internal_Template->renderTemplate() #3 /path/to/revo/core/model/smarty/Smarty.class.php(335): Smarty_Internal_Template->getRenderedTemplate() #4 /path/to/revo/core/model/modx/smarty/modsmarty.class.php(137): Smarty->fetch('security/login....') #5 /path/to/revo/core/model/modx/smarty/modsmarty.class.php(126): modSmarty->fetch('security/login.. in /path/to/revo/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 35


    I can’t quite see the full path there where it’s trying to write a file, but it’s gotta be encountering a permissions error. Bummer that this message got clipped... even in the logs.

    Seems right in line with the bug: http://bugs.modx.com/issues/2604

    Any thoughts? /assets, /core... the standard stuff has been adjusted to 777, but still no dice.

    FIXED: this was something in a core/cache sub directory. Should this be filed as a bug: the setup gave permissions a thumbs up, but Smarty got a thumbs down on permissions here.
      • 22303 MODX Staff
      • 10,725 Posts
      The php process has to be able to write to core/cache/ and all files in all subdirectories of it. If it couldn’t then you changed ownership of the files below core/cache/ somehow.
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Yeah... this all gets back to that request to do more checking of the permissions during day-to-day operations instead of just during setup. I’m running into this all the time as I move from local dev on MAMP to prod out on a Linux server somewhere.
          • 22244
          • 144 Posts
          Same issue here.

          Setting the cache file permissions even to 777 did not help.
          I’m now running a new setup and hope I can fix it with that.
            • 22303 MODX Staff
            • 10,725 Posts
            If you move a site, you should be running setup anyway, which would check the permissions.
              • 22244
              • 144 Posts
              No moving of sites here. Just an upgrade from 2.0.4-pl2

              It can an limited space issue... having the old site, as an maintanance site, on an old platform next to the new modx one that I’m working on.
                • 22244
                • 144 Posts
                Rerun setup
                removed some PDFs to create some space and all seems fine again smiley

                Thanks for the support.
                  • 8311
                  • 25 Posts
                  Please help!

                  I tried upgrading to 2.0.5 after my current version 2.0.4 was having some issues not saving...

                  I have uploaded the new 2..0.5 files and when I got to run setup I get all these errors!


                  Warning: rename(/home/dyna8567/public_html/core/cache/setup/smarty/04d4153560b0d86c13d3bf08e90413c13d8872d5.file.header.tpl.php) [function.rename]: failed to open stream: Permission denied in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 42

                  Warning: rename(/tmp/wrtUphtWJ,/home/dyna8567/public_html/core/cache/setup/smarty/04d4153560b0d86c13d3bf08e90413c13d8872d5.file.header.tpl.php) [function.rename]: Permission denied in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 42

                  Warning: chmod() [function.chmod]: No such file or directory in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 44

                  Warning: rename(/home/dyna8567/public_html/core/cache/setup/smarty/70dc47856775b44b52f57971616018b5433e11ce.file.language.tpl.php) [function.rename]: failed to open stream: Permission denied in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 42

                  Warning: rename(/tmp/wrt9purK8,/home/dyna8567/public_html/core/cache/setup/smarty/70dc47856775b44b52f57971616018b5433e11ce.file.language.tpl.php) [function.rename]: Permission denied in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 42

                  Warning: chmod() [function.chmod]: No such file or directory in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 44

                  Warning: rename(/home/dyna8567/public_html/core/cache/setup/smarty/6c5f3fb46238592c90b562087806e34eb722d02d.file.footer.tpl.php) [function.rename]: failed to open stream: Permission denied in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 42

                  Warning: rename(/tmp/wrtvtzbBx,/home/dyna8567/public_html/core/cache/setup/smarty/6c5f3fb46238592c90b562087806e34eb722d02d.file.footer.tpl.php) [function.rename]: Permission denied in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 42

                  Warning: chmod() [function.chmod]: No such file or directory in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_write_file.php on line 44

                  Warning: include(/home/dyna8567/public_html/core/cache/setup/smarty/04d4153560b0d86c13d3bf08e90413c13d8872d5.file.header.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 422

                  Warning: include() [function.include]: Failed opening ’/home/dyna8567/public_html/core/cache/setup/smarty/04d4153560b0d86c13d3bf08e90413c13d8872d5.file.header.tpl.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 422

                  Warning: include(/home/dyna8567/public_html/core/cache/setup/smarty/70dc47856775b44b52f57971616018b5433e11ce.file.language.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 422

                  Warning: include() [function.include]: Failed opening ’/home/dyna8567/public_html/core/cache/setup/smarty/70dc47856775b44b52f57971616018b5433e11ce.file.language.tpl.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 422

                  Warning: include(/home/dyna8567/public_html/core/cache/setup/smarty/6c5f3fb46238592c90b562087806e34eb722d02d.file.footer.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 422

                  Warning: include() [function.include]: Failed opening ’/home/dyna8567/public_html/core/cache/setup/smarty/6c5f3fb46238592c90b562087806e34eb722d02d.file.footer.tpl.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/dyna8567/public_html/core/model/smarty/sysplugins/smarty_internal_template.php on line 422



                  I have made sure the files are CHMOD 777 and it doesnt help... uploaded the new files 3 times now with no luck..

                  Can anyone point me in the right direction?

                  Cheers
                  Justin
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Delete everything under core/cache/ and make sure core/cache/ is writable by the PHP process in your environment.
                      • 8311
                      • 25 Posts
                      Awesome.. this worked! I had some permissions/ownership issues preventing me from deleting the files...
                      Once my hosting company fixed it up, Everything is working like a charm!

                      Thanks!