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

    Parse error: syntax error, unexpected $end in /homepages/11/d292516919/htdocs/pack4/manager/includes/document.parser.class.inc.php(770) : eval()’d code on line 3
    Quote from: goldsky at Jun 25, 2010, 10:09 PM

    usually this comes from missing file inclusion of a certain function inside a function.

    But where? what file is "line 3" referring to?
    I checked the "document.parser.class.inc.php" file and line three is a note " * MODx Document Parser"

    In the calendar snippet"calendar.inc.php" says "require_once($basePath.’classes/simplepie/simplepie.inc’);" everything seems fine there.

    I am using MODx 1.0.4, MySQL 5.0
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The line 3 is referring to the line in the snippet where the error occurs. The only clue line 770 in the document.parser file gives is whether it’s a snippet or a plugin
      $snip= eval ($snippet);
      

      so it’s a snippet.

      What does line 3 in the snippet code (in the Manager) say?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3722
        • 171 Posts
        Quote from: sottwell at Jun 27, 2010, 11:45 AM

        The line 3 is referring to the line in the snippet where the error occurs. The only clue line 770 in the document.parser file gives is whether it’s a snippet or a plugin
        $snip= eval ($snippet);
        

        so it’s a snippet.

        What does line 3 in the snippet code (in the Manager) say?

        This is my snippet:
        <?php
        $basePath = $modx->config[’base_path’] . ’/assets/snippets/calendar/’; include $basePath . ’calendar.inc.php’
        ?>
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          No semicolon at the end of the include statement?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 3722
            • 171 Posts
            Quote from: sottwell at Jun 27, 2010, 10:34 PM

            No semicolon at the end of the include statement?
            If I add the semicolon, I get this:
            Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /homepages/11/d292516919/htdocs/pack4/assets/snippets/calendar/classes/class.simplepie-gcalendar.php on line 290
              • 3722
              • 171 Posts
              Quote from: BobbyG66 at Jun 28, 2010, 04:58 AM

              Quote from: sottwell at Jun 27, 2010, 10:34 PM

              No semicolon at the end of the include statement?
              If I add the semicolon, I get this:
              Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /homepages/11/d292516919/htdocs/pack4/assets/snippets/calendar/classes/class.simplepie-gcalendar.php on line 290
              OK, I figured it out! I thought I was using PHP 5, but I was really using 4.
              I found my web host is not changing over to PHP 5 until the third quarter of this year.
              In my root directory I add this to the .htaccess file "AddType x-mapp-php5 .php .php4"

              Thanks
              BG66
                • 4620
                • 12 Posts
                Hi!

                I’m having a problem here. Some time ago I changed my ’class.Calendar_Events.php’ to get a calendar starting on Mondays as mrhaw suggested.
                Everything right until this august... This month starts on a Sunday and the workaround is not working in this case.

                Other months are correctly processed, this is the first error I notice. If you look at the image attached, july ends on a saturday (correct) but August starts on a monday (wrong).

                Any ideas?

                Thank you!
                Carins

                Quote from: mrhaw at Feb 16, 2010, 05:37 PM

                class.Calendar_Events.php
                Line 112 change to
                for( $c=1; $c<$this->startOffset; $c++ )


                Then change days in template! smiley
                  • 20413
                  • 2,877 Posts
                  Yes that’s not right! tongue My client decided to ditch google calendar and I haven’t
                  had any time to play with this. sad
                    @hawproductions | http://mrhaw.com/

                    Infograph: MODX Advanced Install in 7 steps:
                    http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                    Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                    http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                    • 4620
                    • 12 Posts

                    Hi Mr Haw.

                    If you have any idea on how I can solve this, please let me know.
                    I’m stuck... huh

                    Thanks
                      • 34017
                      • 898 Posts
                      Some things I would try

                      - delete the cache files
                      - turn debug on in the snippet
                      - change $c=1 to 2,3,4. Just try it out and see if one of those fixes it.

                      My first shot would be at clearing the cache.
                        Chuck the Trukk
                        ProWebscape.com :: Nashville-WebDesign.com
                        - - - - - - - -
                        What are TV's? Here's some info below.
                        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008