We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    I’m in the process of setting up my new VPS.
    when I test modx site with FF or Opera everything seems okay, but when I use IE7 I get this parse error:

      Error:  file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.com/httpdocsassets/images/assets/images/accept-credit-cards.png) is not within the allowed path(s): (/var/www/vhosts/smartsecuritycamera.com/httpdocs:/tmp)   
      Error type/ Nr.:  Warning - 2   
      File:  /var/www/vhosts/mydomain.com/httpdocs/manager/includes/document.parser.class.inc.php(745) : eval()'d code   
      Line:  172 
    


    I think the problem is in the part where I’m missing "/" /httpdocsassets/

    but can’t find why.
    anyone have a direction for me please?
      • 27330
      • 884 Posts
        • 3749
        • 24,544 Posts
        Do you know what snippet or file is asking for accept-credit-cards.png? The code for that request would be where to start (unless you have a flawed rewrite rule in .htaccess).

        You could try turning off FURLs and renaming .htaccess. If that fixes it, it’s a rewrite problem.

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 27330
          • 884 Posts
          thanks bob.
          whats odd I can see this error only on IE,
          if I remove the credit card chunks altogether the error returns with another image name.

          somewhere along I have "assets/images/" added to all my images urls.

            • 3749
            • 24,544 Posts
            I also only see it on IE7. It’s fine in Chrome and FF3. I’m using the default IE7 security settings so you definitely have a problem.

            I’ve noticed in the past that some browsers are more forgiving of path mistakes than others. For example, if you use base_path when you should have used base_url in the path to a URL-type resource (e.g. an image), some browsers will figure out what you meant and make it work and others won’t.



              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 27330
              • 884 Posts
              I thought its only in the visual rendering of the page but not causing modx to show the error.
                • 27330
                • 884 Posts
                I wonder what causes this issue.
                Do you think it could be the fact that I didn’t do the dns changes yet to the new server?

                It seems like assets/images/ is added for no reason and I can’t figure where it comes from.
                when I tried with htaccess renamed and FURLs turned off I get the same error.

                I checked the site configuration in manager and don’t see what would add the assets/images/.
                  • 3749
                  • 24,544 Posts
                  I’m afraid I’m clueless on this one. I hope someone else has a good idea.

                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 10487 MODX Staff
                    • 1,535 Posts
                    I think it’s the base_dir path being prepended to the image path - not the other way round.

                    Now, I had a look and also get the error but on the mysql.png image - looking at the image link, it’s different to the other image links in that it’s referencing the image as a full path (rather than relatively):
                    http://70.32.93.98/assets/templates/blackgold/images/mysql.png

                    I’d put money on the fact that IE is passing the link URL back differently to the other browsers and that is triggering the base_dir error. You have a <base> tag so you should be fine keeping all links etc. as being relative paths.

                    Try changing that link to be relative (and repeat if it trips on other images) - see if that works. Curiously, do you have safe mode/open_basedir settings activated in your php.ini? It may be worth looking into disabling them if you have further problems (or if not in php.ini, there’s a remote chance that the host is setting them elsewhere)

                    EDIT: One more thing, check your plugins - looking at the location of the error in the document parser class it looks like the file_exists() call is originating from a plugin. Do you have a plugin that is perhaps checking images links? (quick way to find out the culprit plugin is to disable them one by one)
                      Garry Nutting
                      Senior Developer
                      MODX, LLC

                      Email: [email protected]
                      Twitter: @garryn
                      Web: modx.com
                      • 27330
                      • 884 Posts
                      you hit it right on the nail, it was my PNGAlpha4MSIE plugin causing it. great now I can try to figure why.
                      thanks so much. this all %^$%$% weekend I try to figure it.