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

    I have a weird situation here. Just upgraded from 095 to 096 and my site hangs if there is anything missing on the page (for example missing pixel.gif ). And it hangs for a pretty long time. After a while page loads.

    this happens only on Firefox MAC OS X. all other browsers (including safari) render the page just fine - they just show a broken image placeholder.
    I disabled all FF add-ons and checked the site on several FF/MAC machines - same story everywhere.

    Same story happens when i ran one banner from an agency, the flash banner was linked to some missing resource. (i removed that banner and problem disappeared for most of the pages but it still hangs on the page with a missing image.)

    Couple of questions:

    1. Is there a debug mode on Modx so i can see what exactly happening when user hits the page?
    2. is there an external tool that can show me all the connections going on at that particular time on the page?
    3. Can it be a server configuration ? (i doubt it but who knows)

    I’m running: Modx 096, Apache version 2.0.52, PHP 4.4.7, MySQL MySQL version 4.1.20

    Any help will be greatly appreciated!

    Thank you!

    Aleks




      MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
      • 2690
      • 148 Posts
      just an update on whats happening:

      i compared the normal page to a problematic one:

      normal: MySQL: 0.0600 s, 250 request(s), PHP: 0.1877 s, total: 0.2477 s, document retrieved from database.
      problem: MySQL: 0.0099 s, 31 request(s), PHP: 96.8087 s, total: 96.8186 s, document retrieved from cache.

      as you can see i def. have an issue here. 96 seconds to load - thats quite a record. and it says that the page is retrieved from cache. what doesnt it mean ? From the cache of a browser or Modx?

      i have friendly urls on and I mostly have ditto and wayfinder calls on my page with 4 custom snippets for banners in this format (same switch cases but different banner codes on the bottom for different sizes):

      <?php
      $id = $modx->documentIdentifier;
      $pid = $modx->getParent($id,1,"id");
      
      while ($pid['id'] != 0) {
          $id = $pid['id'];
          $pid = $modx->getParent($id,1,"id");
      }
      
      switch ($id) {
      case "49" : $zoneID = "43"; break; //laced
      case "50" : $zoneID = "44"; break; //skin
      case "51" : $zoneID = "45"; break; //style
      case "52" : $zoneID = "46"; break; //individuals
      case "53" : $zoneID = "47"; break; //city guide
      case "54" : $zoneID = "48"; break; //entertainment
      case "55" : $zoneID = "48"; break; //contests
      case "56" : $zoneID = "41"; break; //subscribe
      default: $zoneID = "41"; break;
      }
      
      echo "
      <div class='AD_125'>
      <script type='text/javascript'><!--//<![CDATA[
         var m3_u = (location.protocol=='/openads/www/delivery/ajs.php':'/openads/www/delivery/ajs.php');
         var m3_r = Math.floor(Math.random()*99999999999);
         if (!document.MAX_used) document.MAX_used = ',';
         document.write (\"<scr\"+\"ipt type='text/javascript' src='\"+m3_u);
         document.write (\"?zoneid=".$zoneID."\");
         document.write ('&cb=' + m3_r);
         if (document.MAX_used != ',') document.write (\"&exclude=\" + document.MAX_used);
         document.write (\"&loc=\" + escape(window.location));
         if (document.referrer) document.write (\"&referer=\" + escape(document.referrer));
         if (document.context) document.write (\"&context=\" + escape(document.context));
         if (document.mmm_fo) document.write (\"&mmm_fo=1\");
         document.write (\"'></scr\"+\"ipt>\");
      //]]>--></script>
      </div>
      ";
      ?>



        MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
        • 2690
        • 148 Posts
        got advise from my hosting provider:

        ------------
        It looks like due to the 404 handling setup on the site it is requesting a very dynamic 404 page on the same host therefore causing the connections to block for the other objects in the page. I would recommend disabling the custom 404 handler for your image directories.
        ------------

        how do i modify the .htaccess file to exclude all .jpg, .gif, .png files from generating a custom 404 page ?


        thanks,

        Aleks
          MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
          • 27708 MODX Staff
          • 2,502 Posts
          There are numerous accounts of people having problems with upgrading from 0.9.5 to 0.9.6 and the cache as a result of incompatibilities with the TemplateSwitcher. It is recommended that it be deleted from your install. See if that makes any difference. If it is not intsalled, let it be known.
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 2690
            • 148 Posts
            templateswitcher was deleted right from the install.


            i think the problem was in not caching the ditto snippets.
            the speed is much better now, but i’m still working on it so i’ll update with the new findings.

            firebug extension for FF really helps - you see all the connections right away and how long each one takes to execute.

            thank you!

            Aleks
              MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5