We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31418
    • 1 Posts
    Hi!

    i have isnatlled evolution latest version, and php 3.3.5 on a windows 2003 server.

    i get this error( see below) randomly, sometimes the site works fine, but sometimes i get this error:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Invalid CRT parameters detected
    Error type/ Nr.: Warning - 2
    File: D:\***.***.no\manager\includes\document.parser.class.inc.php(814) : eval()’d code
    Line: 21

    Parser timing
    MySQL: 0.0246 s (13 Requests)
    PHP: 0.1191 s
    Total: 0.1437 s



    Any help resolving this would be much appriciated

      • 4310
      • 2,310 Posts
      With a bit of Googling, looks like you have an invalid (for your Windows server) PHP strftime parameter on line 21 of a snippet being called on your page.
        • 17249 ☆ A M B ☆
        • 165 Posts
        Hi;

        I had the same problem.
        Solved using an example from the php website comments about this function: http://php.net/manual/en/function.strftime.php

        <?php
        
        function strftime_win32($format, $ts = null) {
            if (!$ts) $ts = time();
        
            $mapping = array(
                '%C' => sprintf("%02d", date("Y", $ts) / 100),
                '%D' => '%m/%d/%y',
                '%e' => sprintf("%' 2d", date("j", $ts)),
                '%h' => '%b',
                '%n' => "\n",
                '%r' => date("h:i:s", $ts) . " %p",
                '%R' => date("H:i", $ts),
                '%t' => "\t",
                '%T' => '%H:%M:%S',
                '%u' => ($w = date("w", $ts)) ? $w : 7
            );
            $format = str_replace(
                array_keys($mapping),
                array_values($mapping),
                $format
            );
        
            return strftime($format, $ts);
        }
        
        ?>


        Insert the above code at the start of the snippet producing the error. and then replace strftime calls with strftime_win32 in your code. Seems to be working ok for me.

        Hope it helps.