We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50236
    • 2 Posts
    Hi i hav Modx 2.2.13 running on ISPConfig server sompthing happend and it was some time ago i dont cnow what but now when i clear "/core/cache/" folder my manager when i try to edit some resource gives Server error 500.

    I take files from cache that is needed to work propertly (if i delete eny of this files server gives error 500) what can be the reason of this isue

    Files that ar needed
    from: /core/cache/mgr/smarty/
    5dfb8bc11ca5edc790874ed420bb2c314c67049a.file.tinymce.tpl.php
    7d19065a89b0c2ece208fba2f07c41ac4428496d.file.fields.tpl.php
    6329e437866c600d6c481fc6a43f5f6a0615d7cd.file.textbox.tpl.php

    from /core/cache/mgr/smarty/default/
    2b39d9f30c6e974652a4e7fc678b7d5b9dde12d7.file.date.tpl.php
    8de5609a45562b06e1f468d90803c12840aaaf21.file.number.tpl.php
    20b60c154cdab1167b74668bc9b95e735c03ff1d.file.migx.grid.tpl.php
    68b9af550b97df491a30ccc30f27dd2ab57bf0f9.file.checkbox.tpl.php
    229c7272429f3b79e35a0f4d794729eea6df05a5.file.iframewindow.tpl.php
    2433af76fd953073195817e925f6a524b4867c71.file.footer.tpl.php
    6163c8669363656dc822ab358d0c427709415218.file.header.tpl.php
    6329e437866c600d6c481fc6a43f5f6a0615d7cd.file.textbox.tpl.php
    b508b78d7d16cede650058c9584f1c90b89490b2.file.tvs.tpl.php
    f51df8762f97d8638ca324121836234a4179f9bf.file.update.tpl.php
    f280e6f17be18d81ba3d0d4797b9431df3cd212d.file.migx.tpl.php

    This question has been answered by swartor. See the first response.

    • discuss.answer
      • 50236
      • 2 Posts
      Problem solved smiley
      I dig throu error.log after my administrator enable it for me
      Here is the instruction i give him to enable them for me


      These instructions to enable Internal Server Error Logging are for Ubuntu 12.10 with PHP 5.3.10 and Apache/2.2.22.

      Make sure PHP logging is turned on:

      Locate your php.ini file:

      el@apollo:~$ locate php.ini
      /etc/php5/apache2/php.ini


      Edit that file as root:

      sudo vi /etc/php5/apache2/php.ini


      Find this line in php.ini:

      display_errors = Off


      Change the above line to this:

      display_errors = On


      Lower down in the file you'll see this:

      ;display_startup_errors
      ;   Default Value: Off
      ;   Development Value: On
      ;   Production Value: Off
      
      ;error_reporting
      ;   Default Value: E_ALL & ~E_NOTICE
      ;   Development Value: E_ALL | E_STRICT
      ;   Production Value: E_ALL & ~E_DEPRECATED


      The semicolons are comments, that means the lines don't take effect. Change those lines so they look like this:

      display_startup_errors = On
      ;   Default Value: Off
      ;   Development Value: On
      ;   Production Value: Off
      
      error_reporting = E_ALL
      ;   Default Value: E_ALL & ~E_NOTICE
      ;   Development Value: E_ALL | E_STRICT
      ;   Production Value: E_ALL & ~E_DEPRECATED


      What this communicates to PHP is that we want to log all these errors. Warning, there will be a large performance hit, so you don't want this enabled on production because logging takes work and work takes time, time costs money.

      Restarting PHP and Apache should apply the change.

      Do what you did to cause the 500 Internal Server error again, and check the log:

      vi /var/log/apache2/error.log


      You should see the 500 error at the end, something like this:

      [Wed Dec 11 01:00:40 2013] [error] [client 192.168.11.11] PHP Fatal error:  
      Call to undefined function Foobar\\byob\\penguin\\alert() in /yourproject/
      your_src/symfony/Controller/FuckedUpController.php on line 249, referer: 
      https://nuclearreactor.com/abouttoblowup



      The problem was with "Fatal error: Access to undeclared static property: Smarty::$_CHARSET"

      Solution:

      I edit /core/model/smarty/Smarty.class.php

      after
      const PLUGIN_COMPILER = 'compiler';
      const PLUGIN_MODIFIER = 'modifier';


      i add

      /**#@-*/
       
      /**
      * assigned global tpl vars
      */
       
      /**
      * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()
      */
      public static $_previous_error_handler = null;
      /**
      * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()
      */
      public static $_muted_directories = array();
      /**
      * Flag denoting if Multibyte String functions are available
      */
      public static $_MBSTRING = SMARTY_MBSTRING;
      /**
      * The character set to adhere to (e.g. "UTF-8")
      */
      public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET;
      /**
      * The date format to be used internally
      * (accepts date() and strftime())
      */
      public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT;
      /**
      * Flag denoting if PCRE should run in UTF-8 mode
      */
      public static $_UTF8_MODIFIER = 'u';