We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28494
    • 32 Posts
    This is a very weird one...

    When connecting to a url of the form http://my.website.com/index.php?id=9, I’m getting very different results when connecting from Windows browsers vs Mac browsers. When connecting from Mac, pages display as expected, but from Windows the server responds with a 404 error.

    Additionally, Apache server logs report different behavior as follows:

    Mac/Firefox-3.5.3:
    xxx.xxx.xxx.xxx - - [21/Oct/2009:13:54:46 -0700] "GET /index.php?id=9 HTTP/1.1" 200 471 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3"
    


    Mac/Safari-4.x:
    xxx.xxx.xxx.xxx - - [21/Oct/2009:13:53:35 -0700] "GET /index.php?id=9 HTTP/1.1" 200 471 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19"
    



    WinXP/Firefox-3.0.14:
    (notice the out of order timestamps on the requests...never seen that before)
    xxx.xxx.xxx.xxx - - [21/Oct/2009:13:55:11 -0700] "GET /%27 HTTP/1.1" 404 283 "http://my.website.com/index.php?id=9" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
    xxx.xxx.xxx.xxx - - [21/Oct/2009:13:55:10 -0700] "GET /index.php?id=9 HTTP/1.1" 404 33320 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
    xxx.xxx.xxx.xxx - - [21/Oct/2009:13:55:11 -0700] "GET /index.php?id=9 HTTP/1.1" 404 33320 "http://my.website.com/index.php?id=9" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
    



    WinXP/IE-7.0.5730.13
    xxx.xxx.xxx.xxx - - [21/Oct/2009:14:11:42 -0700] "GET /index.php?id=9 HTTP/1.1" 404 33320 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"
    xxx.xxx.xxx.xxx - - [21/Oct/2009:14:11:43 -0700] "GET /' HTTP/1.1" 404 283 "http://my.website.com/index.php?id=9" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"
    xxx.xxx.xxx.xxx - - [21/Oct/2009:14:11:43 -0700] "GET /index.php?id=9 HTTP/1.1" 404 33320 "http://my.website.com/index.php?id=9" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"
    



    This feels like a configuration issue of some kind, which may not be related to MODx - but since I’m working on a server that I’ve done lots of other work on and have never seen anything quite like this, I’m hoping someone in the MODx sphere can shed some light. Also, since the requests from Windows appear to be redirected, and I’m not doing anything fancy (or at all) in httpd.conf/mod_rewrite/htaccess that would trigger a redirect, the problem would seem to point to something being amiss or mis-configured in MODx...or maybe good ol’ Windoze is rearing its ugly head at me again...

    Any help would be appreciated.

    Thanks.
      • 28494
      • 32 Posts
      To get to the bottom of this one, I ended up getting very cozy with modx.class.php and modrequest.class.php...and when I got to around line 181 of modrequest.class.php, I realized what was happening. That line reads:

      if (!$this->modx->hasPermission('view_unpublished')) $criteria['published']= 1;
      


      The problem was that I was logged in as an admin from my main (Mac) dev box, and not logged in to my Windows (Parallels) testing box...and the content/resource that I was testing against was not published...So, the windows box was getting a 404 response due to the fact that the user did not hasPermission to view_unpublished content.

      Ouch, hard lesson to learn...