We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19799
    • 14 Posts
    Getting the following errors after upgrade from 1.0.4 on some pages.

    On shared hosting (FreeBSD 7.3-i386-20100714 i386) with MySQL 5.0.90 and PHP 5.2.12 and Apache 2

    [Sun Jan 23 16:39:49 2011] [error] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30309 bytes) in /home/u13781/tsc.vhosts.ru/www/manager/includes/tmplvars.commands.inc.php on line 137

    likewise on localhost (Linux dps 2.6.35-24-generic #42-Ubuntu SMP) with MySQL 5.1.49 and PHP 5.3.3 and Apache 2.2

    [Sun Jan 23 17:59:41 2011] [error] [client 127.0.0.1] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 61329 bytes) in /media/dps/www/tsc/htdocs/manager/includes/tmplvars.commands.inc.php on line 21

    Totally at loss, thanks for any hint.
      • 21257 MODX Staff
      • 730 Posts
      mk93, what are the TV values set to, in cases where the pages don’t work.
      Are there @ bindings at work?
      The more detail you can give, the more likely I can track down the problem.
      Thanks
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 19799
        • 14 Posts
        Here the example URL: http://tsc.vhosts.ru/air.html

        The page is based on the template which uses tvs:
        slogan set to:
        @INHERIT Мы делаем отопление эффективным

        time set to:
        @EVAL return strftime('%Y');

        extraScripts set to: empty
        SidebarBlocks list set to: "nav", which is name of chunk with Wayfinder call.
        seoOverride set to: Disabled
        extraCss set to: empty
        extraHeadJs set to: empty

        Problem is that the other pages based on the same template (http://tsc.vhosts.ru/products.html for example), are processed fine.
        TVs values are the same for these two.
          • 19799
          • 14 Posts
          The template code:
          {{head}} 
          <body>  
          {{banner_inner}}
              
          <!-- content starts -->
              <div id="content-wrapper" class="container_16">	
          	<div id="breadCrumb" class="grid_11 prefix_5">
                    [[Breadcrumbs]]
                   </div>
          <!-- left sidebar starts here -->
          <div class="sidebars grid_5">
                  [*SidebarBlocks*]
          </div>
          <!-- left sidebar ends here -->
          		
          	<div id="main" class="grid_11">
          
                  
                  <h2> [*pagetitle*]</h2> 
                    [*#content*]
                   <!-- /#content-output -->
          
                </div>
          <div class="clear"></div>
                <!-- main ends here -->
          
              </div>
          <!-- content ends here -->
          
          
          {{footer}}
          </body>
          </html>


          The {{banner_inner}} code:
          <!-- HEADER START -->
          <div id="header" class="container_16">
          		<div id="header-main">
                          <img id="logo" src="http://static.vhosts.ru/tsc/img/tmt120.gif" alt="ТСЦ ТеплоМаркеТ лого" />
          		<h1 id="logo-text"><a href="[~1~]">«ТСЦ ТеплоМаркеТ»</a></h1>
          		<p id="slogan_inner">[*slogan*]</p>
                         </div>
          	<!-- Navigation -->
                    [[Wayfinder? &startId=`0`&level=`1`&outerTpl=`navTpl`&outerClass=`nav`]]
                    [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`141` &clearDefault=`1` &hideMenu=`0` &showIntro=`0` &tplLayout=`@FILE:assets/site/ajax.tpl.html` &AS_showResults=`0`!]
          </div><!-- header ends here -->


          The {{footer}} code:
          <!-- footer bottom starts here -->
                <div id="footer-bottom">
          	  <p class="float-left">©ТСЦ «ТеплоМаркеТ» 2006 – [*time*] </p>
                  
                  <ul class="links secondary-links">
          		  <li><a href="scheme.html" title="Адрес и контакты">Контакты</a></li>
          		  <li><a href="sitemap.html" title="Карта сайта">Карта сайта</a></li>
                    <li><a class="external" href="http://jigsaw.w3.org/css-validator/check/referer" title="">CSS</a></li>
                    <li><a class="external" href="http://validator.w3.org/check/referer" title="">XHTML</a></li>
                 </ul>
          <p>
          MySQL: [^qt^], [^q^] request(s), PHP: [^p^], total: [^t^], document retrieved
                  from [^s^]
          </p>
                </div>
          <!-- footer bottom ends here -->
          
              </div>
          <!-- footer ends here -->
          <!-- Grab Yandex CDN's jQuery. fall back to local if necessary -->
            <script src="http://yandex.st/jquery/1.4.3/jquery.min.js" type="text/javascript" charset="utf-8"></script>
            <script type="text/javascript" charset="utf-8">!window.jQuery && document.write('<script src="http://static.vhosts.ru/tsc/js/jquery-1.4.3.min.js" type="text/javascript"><\/script>')</script>
          <!--[if lt IE 7 ]>
              <script src="http://static.vhosts.ru/tsc/js/DD_belatedPNG.js?v=1" type="text/javascript" charset="utf-8"></script>
          <script type="text/javascript" charset="utf-8">DD_belatedPNG.fix('#logo, .icon, .btn')</script>
          <![endif]-->
          <script type="text/javascript" charset="utf-8">$(document).ready( function() {$('a.external').click( function() {  window.open(this.href);  return false;}); });</script>
          [*extraScripts*]
          
            • 2740
            • 95 Posts
            mk93 were you able to find the problem? I’ve just upgraded one of my site to 1.0.5 from 1.0.2 and now most of the pages produce the error:

            Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 31113 bytes) in .../manager/includes/tmplvars.commands.inc.php on line 82


            The line number sometimes is as above or 21 or 137 depending on the page called. The site had been working great for months prior to the upgrade. I’ve had to put the site offline.
              • 19799
              • 14 Posts
              stratton, unfortunatelly no.
              The sympthoms are exactly like yours and I had to go back to 1.0.4.
                • 5340
                • 1,624 Posts
                I think the the problem is with a snippet that calls getTVDisplayFormat.

                Can you deactivate snippets one by one? This way, you might be able to narrow the problem.

                  • 19799
                  • 14 Posts
                  cipa, THANK YOU!

                  It was TV with @INHERIT binding. Somehow it has no effect on some pages and has on all other. Fortunatelly, @INHERIT was not truly necessary in my particular case.
                    • 5340
                    • 1,624 Posts
                    Could you please file a bug report if you think this is necessary. Thx
                      • 19799
                      • 14 Posts
                      Will do.