ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problems Moving the System Directory Above Webroot

February 26, 2012 6:29pm

Subscribe [2]
  • #1 / Feb 26, 2012 6:29pm

    BrianPx

    14 posts

    I’m trying to follow the EE recommendation to titled “Moving the System Directory Above Webroot” (http://ellislab.com/expressionengine/user-guide/installation/best_practices.html).

    However, here is the error message I get in my web browser:

    "Your system folder path does not appear to be set correctly. 
    Please open the following file and correct this: index.php"

    I’ve followed the directions exactly so I’m not sure what else to do.  Thanks.

  • #2 / Feb 27, 2012 3:55pm

    Shane Eckert

    7174 posts

    Hello BrianPx,

    I am sorry to hear you are running into this snag.

    The error is being very specific, so let’s chase down where the paths are not correctly set.

    Are all of the locations below consistent?

    Design > Templates > Global Preferences
    Content > Files > File Upload Preferences


    And this location has not only the correct name but the correct path as well?

    In admin.php and index.php
    
    $system_path = 'location';

    Let me know if those all look the same.

    Cheers,

     

  • #3 / Feb 27, 2012 5:27pm

    BrianPx

    14 posts

    Basepath to Template File Directory has not changed since its location has not changed.  I store templates in a folder called “Assets” outside the system folder.
    Server Path to Upload Directory has not changed for similar reasons.

    The structure is like this:
    mysite.com—>
      httpdocs—>assets, images, index.php, admin.php
      system—> the usual files and folders

    In index.php
    $system_path = ‘../system’;

    In admin.php
    $system_path = ‘../system’;

     

     

  • #4 / Feb 28, 2012 12:56pm

    Shane Eckert

    7174 posts

    Hello BrianPx,

    I am sorry to hear you are still dealing with this issue.

    Just to make sure, your system folder is then sitting one directory above web root. Like so:

    ├── public_html
    |   ├── admin.php
    |   ├── index.php
    |   ├── images
    │   └── themes
    └── system

    Not two, or more, just one directory above so that the relative path is working correctly.

    I am really trying to think of what might be causing ExpressionEngine to be unable to find your system folder.

    Are the directory permissions correct and the owner as well?

    Please let me know what you find.

    Thank you,

     

  • #5 / Feb 29, 2012 12:03am

    BrianPx

    14 posts

    Re-checked everything again, and it appears ok.  Still getting error message:
    “Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php”

    Not sure how to check to see if directory permissions and owner are correct.

    NOW also getting this error at top of the control panel when I log in:

    Notice
    
    An unexpected error occurred attempting to download the current ExpressionEngine version number. Please visit your Download Account to verify you are on the current version. If this error persists, please contact your system administrator
  • #6 / Feb 29, 2012 5:59pm

    Shane Eckert

    7174 posts

    Hello BrianPx,

    I am really sorry that you are still dealing with this frustration.

    Do you have access to ftp? You can view permissions through most clients, FileZilla is one such client that makes it easy to see both owner and permissions. These are very important, so we need to make sure they are correct.

    If you are able to check those and they are correct, then let’s move on.

    ————————————————————-

    Let’s back up a bit.

    If you return your folder to default location, and that’s all, you should still get the same message. So do that, and if the same message appears, then good.

    Next keep the folder in the default location and update the two files. (index.php and admin.php)

    Then test. This should return no errors. If that is true, then good. We are back at baseline. If you do get an error, then there is something else going on. At this point please report back here and tell us what you find.

    From the baseline make the changes again, move the folder up one directory and update the two files again.

    Let me know what you see.

    Cheers,

  • #7 / Feb 29, 2012 6:10pm

    BrianPx

    14 posts

    OK, I figured it out.  My server is on mediaTemple: THAT IS THE ISSUE.

    The way plesk sets up domains prevents PHP access above the root.  This is a security measure (ha ha).  To allow PHP access above the root, you have to set the open_basedir in the vhost.conf file.


    <Directory “/var/www/vhosts/site-a.com/httpdocs”>
    php_admin_value open_basedir none
    php_admin_value safe_mode off
    </Directory>

    then reconfigure your webserver so it will look for your new vhost.conf file by doing this:
    /usr/local/psa/admin/sbin/httpdmng—reconfigure-domain example.com
    via ssh

    then restart Apache by this:
    /etc/init.d/httpd stop
    /etc/init.d/httpd start
    via ssh

    Yikes!
    Here’s my references to the solution:
    (1) http://wiki.mediatemple.net/w/(dv)_4.0:Set_the_path_for_open_basedir
    (2) http://pixelsandems.com/archive/expressionengine-multiple-site-manager-plesk
    (3) http://ellislab.com/forums/viewthread/183848/#881159

    Still getting the message on the CP though:
    “An unexpected error occurred attempting to download the current ExpressionEngine version number. Please visit your Download Account to verify you are on the current version. If this error persists, please contact your system administrator”

  • #8 / Feb 29, 2012 6:26pm

    Shane Eckert

    7174 posts

    Hello BrianPx,

    Wow. I am bookmarking this one. Thank you for the information.

    You can turn off version checking to get rid of the message. It’s just letting you know that it is unable to dial home and check for the latest version. Admin > General configuration > New Version Auto Check > No

    Or, you can leave that on and go to “/system/expressionengine/cache/” and delete the “ee_version” folder. Perhaps at the time of the version check, a connectivity issue occurred, which resulted in the error. Clearing the cache should do the trick.

    This is typically a connectivity issue which you can troubleshoot with your provider. It will often go away on it’s own.

    Is there anything else I can help you with?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases