We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18646
    • 106 Posts
    I just migrated a client site to their new server, and now I get this error on some pages when I’m logged in as the manager:

    Parse error: syntax error, unexpected ')' in /home/mwest/public_html/assets/plugins/phx/phx.parser.class.inc.php(220) : eval()'d code on line 1
    Parse error: syntax error, unexpected ')' in /home/mwest/public_html/assets/plugins/phx/phx.parser.class.inc.php(226) : eval()'d code on line 1


    This only happens when I look at the site when i’m logged into the backend, And if i refresh the page, it goes away. I’m using PHx 2.1.3 and MODx 1.0.2.

    Has anyone seen this before? Considering this was working fine on the staging server, I’m thinking it must have to do with the server move.

    Regards,
    Matt
      • 5340
      • 1,624 Posts
      Can you confirm that PHx is working?

      Also try changing

      include_once $modx->config[’rb_base_dir’] . "plugins/phx/phx.parser.class.inc.php";

      to

      include_once $modx->config[’base_path’] . "assets/plugins/phx/phx.parser.class.inc.php";

      in the plugin
        • 18646
        • 106 Posts
        Yup, PHx definitely works. I also tried to changing the include_once path to what you’ve suggested already. I found that in a different post. I’m stumped huh

        Regards,
        Matt
          • 5340
          • 1,624 Posts
          Try disabling plugins one by one and see if it makes any difference.

          Also remove all the phx references and see if the errors disappear.
            • 18646
            • 106 Posts
            yes, the errors do disappear when i disable PHx, but that plugin is essential for the site. This site is also being hosted with Hostgator if that makes any difference. I came across this thread which i thought might shed some light on this:

            http://modxcms.com/forums/index.php?topic=22066.0

            But permissions don’t seem to be the issue.

            Regards,
            Matt
              • 2798
              • 22 Posts
              Hi there,

              same error occures on my modx Evo 1.0.4 with PHx Version 2.1.4

              Parse error: syntax error, unexpected ')' in D:\001 WORK\003 -_- LOCALHOST\xampp\htdocs\modxe-hoelscher\assets\plugins\phx\phx.parser.class.inc.php(226) : eval()'d code on line 1


              As discribed, the error occures only if i’m logged in as manager when i preview the site. The modx-Errorlog is still leaves empty. I also tried to change the include-path
              include_once $modx->config['rb_base_dir'] . "plugins/phx/phx.parser.class.inc.php";

              like discribed above, with no changes to my parse error!

              I also tried remove my phx-installation and tried to install it again, also no changes!

              Any suggestions for me

              EDIT: Sorry, my mistake! It was a wrong syntax in my phpthumb-Call. Edited the phpthumb-call and the error is far away - thx.....
                • 12110
                • 122 Posts
                I had this problem, when I used ifempty:

                [*motivGross1:ifempty=``:else=`<ul><li>[*motivGross1*]</li>`*]


                Changing to
                [*motivGross1:is=``:then=``:else=`<ul><li>[*motivGross1*]</li>`*]


                made the parse errors disappear. Something broken with ifempty?
                  • 9550
                  • 123 Posts
                  Quote from: hgw at Nov 18, 2010, 05:16 AM

                  I had this problem, when I used ifempty:

                  [*motivGross1:ifempty=``:else=`<ul><li>[*motivGross1*]</li>`*]


                  Changing to
                  [*motivGross1:is=``:then=``:else=`<ul><li>[*motivGross1*]</li>`*]


                  made the parse errors disappear. Something broken with ifempty?

                  hgw: thanks man! got this issues after moving an old evo site and removing the :ifempty filters totally fixed it. thanks again laugh