We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30693
    • 5 Posts
    On a site with long medical articles I have run into a problem with PHx quitting when the data in the content field is too big. The event log indicates that PHx quits halfway through the second parsing of the content field. Anyone else run into this?

    -Truls, Noway
    • Quote from: trulss at May 28, 2009, 11:31 AM

      On a site with long medical articles I have run into a problem with PHx quitting when the data in the content field is too big. The event log indicates that PHx quits halfway through the second parsing of the content field. Anyone else run into this?

      -Truls, Noway
      Do you have out of memory errors in your php error log (or the apache error log)? I suspect you are simply running PHP with a very low memory_limit. Try increasing that.
        • 30693
        • 5 Posts
        Quote from: OpenGeek at May 28, 2009, 01:35 PM

        Quote from: trulss at May 28, 2009, 11:31 AM

        On a site with long medical articles I have run into a problem with PHx quitting when the data in the content field is too big. The event log indicates that PHx quits halfway through the second parsing of the content field. Anyone else run into this?
        Do you have out of memory errors in your php error log (or the apache error log)? I suspect you are simply running PHP with a very low memory_limit. Try increasing that.

        No error messages. I have tried PHP setting memory_limit both higher and with no limit without any change. I suppose it is my use of a chunck common to all templates, where I use multipe PHx calls to check for template that causes the problem:

        [tt][+phx:if=`[*template*]`:is=`3`:then=`<!--- side --->
        [+phx:if=`[*id*]`:is=`1`:then=`{{forsidenyheter}}{{forsidefagstoff}}`:else=`{{side}}`+]
        `+]

        [+phx:if=`[*template*]`:is=`4`:then=`<!--- nyhet --->
        [+phx:if=`[*id:level*]`:is=`1`:then=`{{nyhetsarkiv}}`+]
        [+phx:if=`[*id:level*]`:is=`2`:then=`{{artikkel}}`+]
        `+]


        [+phx:if=`[*template*]`:is=`6`:then=`<!--- arrangement --->
        [+phx:if=`[*id:level*]`:is=`1`:then=`{{arrangementsoversikt}}`+]
        [+phx:if=`[*id:level*]`:is=`2`:then=`{{arrangement}}`+]
        `+]

        [+phx:if=`[*template*]`:is=`7`:then=`<!--- forening --->
        Ikke implementert enda
        `+]

        [+phx:if=`[*template*]`:is=`8`:then=`<!--- stilling --->
        Ikke implementert enda
        `+]

        [+phx:if=`[*template*]`:is=`9`:then=`<!--- link --->
        Ikke implementert enda
        `+][/tt]

        When i divide the chunck into the separate templates everything work ok.
          • 33337
          • 3,975 Posts
          Wow.. thats lots of PHx!

          Try increasing the Max Pass in PHx Plugin configuration panel.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • Quote from: trulss at May 28, 2009, 11:31 AM

            On a site with long medical articles I have run into a problem with PHx quitting when the data in the content field is too big. The event log indicates that PHx quits halfway through the second parsing of the content field. Anyone else run into this?

            -Truls, Noway

            I have run into this issue before, and in fact it crept up on me again today. It seems only to occur when the conditional return value is very large, which if you’re dealing with NESTED PHx can occur very quickly. In our case (as with yours, trulss), it is the content itself that is lengthy and just one single PHx call.

            I have tried increasing maxPass to over 200 with no luck... current PHP memory_limit = 128M (changing it to 256M had no effect...) sad

            I seem to have made the assumption that whatever the return value was (chunk/snippet/etc) would ONLY be evaluated upon meeting the PHx conditions, but it obviously appears to evaluate regardless, and simply RETURNS this value as the response. I’ll see if I can dig into PHx and determine the need for this / and hopefully a solution...

            @bonzai, any recommendations for this scenario?
              Mike Reid - www.pixelchutes.com
              MODx Ambassador / Contributor
              [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
              ________________________________
              Where every pixel matters.
              • 20413
              • 2,877 Posts
              EDIT when I tested this wiki page in the content field as a chunk:
              http://en.wikipedia.org/wiki/Line_of_succession_to_the_British_throne /384 Kb
              PHx failed for me as well (I did replace ][+’: etc. with letters...)

              ...and my siteCache.idx.php increased with 384 kb tongue
                @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
                • 5811
                • 1,717 Posts
                I have also noticed this issue.
                See http://modxcms.com/forums/index.php/topic,35094.msg222552.html#msg222552

                A fix for this issue will securised the behaviour of lot of snippets and will be welcome.
                  • 22770
                  • 285 Posts
                  Does anyone know if a solution was ever found for this issue?
                    • 22770
                    • 285 Posts
                    I’ve fudged it in the case I encountered by splitting one PHx call into two, but it’s not a great solution:
                    [*extract:isnt:then=`<div class="section">[*extract*]</div>`*]

                    becomes
                    [*extract:isnt:then=`<div class="section">`*]
                    [*extract*]
                    [*extract:isnt:then=`</div>`*]

                    Obviously, that’s not going to work in most situations.
                      • 34017
                      • 898 Posts
                      I think it makes the most sense to use a snippet for that cal with a switch in it.
                        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