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

    My hosting server has recently been re-built (linux), and now all the domains running modx have an additional phpMyAdmin session appended to the URL. This does not occur with the other CMS used on the site, CubeCart. And it did not occur before the server was re-built, but they were on the previous release before so it’s not conclusive.

    If the site is not using FURLs, then the pages all return an error:

    MODx encountered the following error while attempting to parse the requested resource: 
    « ID passed in request is NaN! » 
    


    Example of the URL, one with FURLs and one with default:
    /index.php?id=19?phpMyAdmin=EnzuN1Z4lHo2jl4BxU5KX7Kw089
    /facilities.html?phpMyAdmin=EnzuN1Z4lHo2jl4BxU5KX7Kw089


    I’ve asked my hosting provider about it, and they have looked into it and have not found a cause. The hosting uses Plesk, and there is phpMyAdmin installed through Plesk, but it’s not logged in and phpMyAdmin is not running at the time.

    Has anyone come across this before? or have an idea of where to look to find the cause? A specific Apache setting, or phpMyAdmin setting perhaps? or even a MODx issue (as CubeCart does not have the problem)? Any ideas or things to check/test welcome.

    (Tested using Modx 0.9.5.)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Could be a cookie issue; if you had a cookie set by phpMyAdmin it might be getting crossed with the MODx session cookies somehow.
        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
        • 25317
        • 122 Posts
        Thanks for your reply. I’ve cleared all session cookies, domain cookies, and disabled cookies using Firefox Web plugin, and no change.... Do you get them in the address bar? try this site www.stjohnscampsite.com
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Yes, I do. Check out your .htaccess files; keep in mind that they are "inherited" so if MODx is not in the web root you’ll need to look there also for .htaccess files.

          Hmmm... I see this is in the HTML source of the links, so it’s probably not .htaccess. Very odd; are you using Wayfinder to make your menu?
            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
            • 4041
            • 788 Posts
            have a look here and see if any of these apply to your setup....

            http://www.google.com/search?hl=en&q=phpmyadmin+session+appended+to+url
              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 25317
              • 122 Posts
              Quote from: sottwell at Jun 03, 2007, 01:41 PM

              Yes, I do. Check out your .htaccess files; keep in mind that they are "inherited" so if MODx is not in the web root you’ll need to look there also for .htaccess files.

              Hmmm... I see this is in the HTML source of the links, so it’s probably not .htaccess. Very odd; are you using Wayfinder to make your menu?
              I’ve just found out why it’s appearing.

              I’ve done a number of restores recently, and it looks like the phpMyAdmin SQL import has appended the session ID to various items of code as it restored.

              Example from the ListGlobal snippet:
              $globalCount = 0;
              foreach ($globalKids as $kid){
                  $output .= '<li';
                  $output .= ($kid['id']==$sectionId)? ' class="LGlob_active"' : '' ;
                  $output .= '><a href="[~'.$kid['id'].'~]?phpMyAdmin=YntT6WTdTDMByfRsigDEg-m%2ClXd" ';
                  $output .= 'title="'.$kid['pagetitle'].'">';
                  $output .= $kid['pagetitle'].'</a></li>';
                  $globalCount++;
              }


              My GetLink snippet:

              <?php
              // Use id=doc_number, and optional title=name
              
              $rs = $etomite->getDocument($id);
              $title =  isset($title) ? $title : $rs['pagetitle'];  
              $output = '<a href="[~'.$id.'~]?phpMyAdmin=c0519853f20dff51db968a824105c241" title="'.$title.'"> '.$title.'</a> '.$rs['description'];
              return $output;
              ?>


              Damn phpMYAdmin.... this is gonna take me ages to sort out!
                • 25317
                • 122 Posts
                This is ODD!

                This code:
                for ($y = 0; $y < $limit; $y++) {
                  $output .= "<fieldset><legend>";
                  $output .= "<a href='[~".$rs[$y]['id']."~]' target='_blank' title='".$rs[$y]['pagetitle']."'>".$rs[$y]['pagetitle']."</a>";
                  $output .= "</legend>";
                  $output .= $rs[$y]['description']."</fieldset>";
                }


                Changed to this...
                for ($y = 0; $y < $limit; $y++) {
                  $output .= "<fieldset><input type="hidden" name="phpMyAdmin" value="YntT6WTdTDMByfRsigDEg-m%2ClXd" /><legend>";
                  $output .= "<a href='[~".$rs[$y]['id']."~]'?phpMyAdmin=YntT6WTdTDMByfRsigDEg-m%2ClXd target='_blank' title='".$rs[$y]['pagetitle']."'>".$rs[$y]['pagetitle']."</a>";
                  $output .= "</legend>";
                  $output .= $rs[$y]['description']."</fieldset>";
                }

                It’s done more than just append code..... very odd.