We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4594
    • 74 Posts
    hello to all!

    i wanted to move my local site to my apache live-server. but there are some strange errors.

    1. everything is fine, when i’m not logged into the manager. the site is working with "friendly url’s disabled.
    But if i log in and i go back to preview my site, the following error occurs:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error: 	Unknown: failed to open stream: No such file or directory	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	/home/xyz/subdomain.testsite.de/www/modx/manager/includes/document.parser.class.inc.php(724) : eval()'d code	 
      Line: 	70
    


    2. When i turn on "friendly url’s" and i’m not logged in, i only can see my startpage. on every other page i want to navigate there is a "document not found".

    some of my server settings:

    - apache
    - php 5.0.4
    - mod-rewrite is installed

    maybe its because the whole site is in an apache-protected directory? (the "www" folder).

    i’m thankful for any help!

    greetz, captain.

    sorry for my bad english...
      • 25663 MODX Staff
      • 12,272 Posts
      Are you sure you moved the .htaccess files to the production server, or renamed them from ht.access to .htaccess? Also, are you sure your production server supports them?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4594
        • 74 Posts
        Are you sure you moved the .htaccess files to the production server, or renamed them from ht.access to .htaccess? Also, are you sure your production server supports them?

        yes i am sure that the .htaccess file is on the server and its written correctly and is supported.

        RewriteEngine On
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]


        and if i delete it and deactivate in the manager the "friendly url’s", the same error occurs.

        another strange thing is, that my site cannot find my snippets (wayfinder). the normal include_path is:

        "assets/snippets/wayfinder/wayfinder.inc.php"

        that does not work. but if i insert

        "/home/xyz/subdomain.testsite.de/www/modx/assets/snippets/wayfinder/wayfinder.inc.php"

        it does work.

        ????
          • 25663 MODX Staff
          • 12,272 Posts
          Did you re-run the installer in upgrade mode when you moved servers?
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 4594
            • 74 Posts
            no, i did it like its described here: http://modxcms.com/moving-sites-to-new-servers.html

            step by step....

            but i tried a completely new installation with the testsite in a new testfolder. same error, when i logged into the manager...
              • 22303 MODX Staff
              • 10,725 Posts
              The problem is with Wayfinder and with open_basedir restrictions in effect. The open_basedir settings in PHP 5.0.4 are flawed and do not work properly. This is likely the source of the other issues as well...although if in a subdirectory of the document root (i.e. the document root=/www/), the rewrite base needs to be /modx/ in .htaccess.
                • 4594
                • 74 Posts
                The problem is with Wayfinder and with open_basedir restrictions in effect. The open_basedir settings in PHP 5.0.4 are flawed and do not work properly. This is likely the source of the other issues as well...

                do you mean, that it does not work correctly with php 5.0.4?? or are there any workarounds to change the open_basedir settings? in my phpinfo.php, open_basedir has "no value". sorry, maybe i do not understand waht you mean....

                although if in a subdirectory of the document root (i.e. the document root=/www/), the rewrite base needs to be /modx/ in .htaccess.

                right, this was my fault...
                  • 22303 MODX Staff
                  • 10,725 Posts
                  I mean running PHP 5.0.4 with open_basedir restrictions in effect is broken yes...the change you made to Wayfinder is the only way to make it work on that version. I’ve had to modify entire PHP applications to work on PHP 5.0.4 with this setting because of the issue, including ones I’ve paid good money for...
                    • 4594
                    • 74 Posts
                    ok, thanks for your help. maybe i can ask my ISP to update the php-version... on my local machine i’ve installed php 5.1.4 and everything worked fine...
                      • 4594
                      • 74 Posts
                      me once again...

                      i’ve spoken with my ISP and he says its an include_path problem. so i tested, if the include path is change, or not. i put this peace of code into my "manager/index.php" before "// set some runtime options":
                      echo get_include_path() . "<br />";
                      echo get_include_path(); exit();


                      the result is:
                      /usr/share/php5
                      /usr/share/php5


                      is it right, that the include_path is not overwritten? and why this could be happen?