We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18817 ☆ A M B ☆
    • 205 Posts
    I have a site that’s I’m trying to implement some advanced functionality, ie: blog and custom article archiving with categories/tags. I’ve been trying to learn PHx as it seems to be the solution that I need, unfortunately, as soon as set it up I get the following error:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Unknown(): open_basedir restriction in effect. File(/assets/plugins/phx/phx.parser.class.inc.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp)
    Error type/ Nr.: Warning - 2
    File: /var/www/vhosts/domain.com/httpdocs/manager/includes/document.parser.class.inc.php(724) : eval()’d code
    Line: 10

    Parser timing
    MySQL: 0.0307 s (4 Requests)
    PHP: 0.0451 s
    Total: 0.0758 s

    Note: I changed the domain name to domain.com only for this posting.

    My first question I guess should be, will PHx even work on 0.9.5?
    Second, I’ve created a subdomain on this site and installed 0.9.6.3 to test out the above theory, still getting a parse error.

    Is there a safe way to upgrade the current installation without loosing data (huge site)? Will upgrading even help in this instance? I was told that PHx needs PHP5 to run correctly - is that true?

    ANY help will be greatly appreciated. I’m at a loss for what I can do to make this work correctly :’( ...other then using Wordpress tongue

      Sal Baldovinos
      SEO & DIGITAL MARKETING

      ARIEL DIGITAL | Maximize Your Potential
      www.arieldigitalmarketing.com
      • 36592
      • 970 Posts
      How are you setting your Resource Path in your modx configuration ?
        • 25663 MODX Staff
        • 12,272 Posts
        I actually don’t think PHx will work in 095 now that I think about it.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 18817 ☆ A M B ☆
          • 205 Posts
          @thfm ~ My resource paths are set, thanks for the insight!

          Hey Ryan, thanks for the message - see you at Pop Labs soon?

          What I’m thinking about doing is exporting the dB and doing a new install on a staging site and then see if it works for me there when I import the current dB structure. undecided
            Sal Baldovinos
            SEO & DIGITAL MARKETING

            ARIEL DIGITAL | Maximize Your Potential
            www.arieldigitalmarketing.com
            • 25663 MODX Staff
            • 12,272 Posts
            That should work Sal. Just make a copy, run the latest installer in upgrade mode, and you should be good. I sure hope to make it down again soon. smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 18817 ☆ A M B ☆
              • 205 Posts
              Something else is causing my woes.

              I went into MySQL Admin and created a backup of the current site’s database. I created a new install for the site on our staging server and imported the the current site’s db, images, styles, etc. Site looks/works perfect and is upgraded, yay! BUT, BIG BUT....PHx is STILL not working and giving me this error:

              « MODx Parse Error »
              MODx encountered the following error while attempting to parse the requested resource:
              « PHP Parse Error »
               
              PHP error debug
                Error: 	Unknown(): open_basedir restriction in effect. File(/assets/plugins/phx/phx.parser.class.inc.php) is not within the allowed path(s): (/var/www/vhosts/xxxx-staging.com/subdomains/domain/httpdocs:/tmp)	 
                Error type/ Nr.: 	Warning - 2	 
                File: 	/var/www/vhosts/xxxxx-staging.com/subdomains/domain/httpdocs/manager/includes/document.parser.class.inc.php(745) : eval()'d code	 
                Line: 	10	 
               
              Parser timing
                MySQL: 	0.0279 s	(3 Requests)
                PHP: 	0.0364 s	 
                Total: 	0.0643 s
              


              This site is using Ditto and that’s about it as far as other snippets.. huh
                Sal Baldovinos
                SEO & DIGITAL MARKETING

                ARIEL DIGITAL | Maximize Your Potential
                www.arieldigitalmarketing.com
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                It’s thinking that the script is in /assets..., which path is from the root of your file system, not from the root of the webspace. Do you have a base href=... meta tag in your template’s head?
                  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
                  • 18817 ☆ A M B ☆
                  • 205 Posts
                  Quote from: sottwell at May 12, 2009, 03:08 PM

                  It’s thinking that the script is in /assets..., which path is from the root of your file system, not from the root of the webspace. Do you have a base href=... meta tag in your template’s head?

                  The only thing I have in the head that calls that is my stylesheet:
                  <link rel="stylesheet" type="text/css" media="screen,projection" title="Default" href="[(base_url)]assets/templates/layout/layout.css" />
                    Sal Baldovinos
                    SEO & DIGITAL MARKETING

                    ARIEL DIGITAL | Maximize Your Potential
                    www.arieldigitalmarketing.com
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Try putting the <base href="[(site_url)]"></base> in your template head. That sets the base root for all relative paths and urls in the page.
                      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
                      • 18817 ☆ A M B ☆
                      • 205 Posts
                      Quote from: sottwell at May 12, 2009, 03:16 PM

                      Try putting the <base href="[(site_url)]"></base> in your template head. That sets the base root for all relative paths and urls in the page.

                      Actually, you got me thinking and I went to Tools > Configuration > Interface & Features

                      I set the Resource Path & URL to the current areas (it was still set to the original site’s paths). Thanks so much for your help, everyone! I hope this was the fix smiley grin
                        Sal Baldovinos
                        SEO & DIGITAL MARKETING

                        ARIEL DIGITAL | Maximize Your Potential
                        www.arieldigitalmarketing.com