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.

Strange CP access behaviour after changing the sytem folder name

January 25, 2012 4:53pm

Subscribe [3]
  • #1 / Jan 25, 2012 4:53pm

    Jérôme Coupé

    122 posts

    Hi there,

    Vanilla install of 2.4 on a MAMP local server.
    PHP Version 5.3.6
    MySQL Version 5.5.9

    Install went smoothly and I had access to the CP using the following URL

    http://domain.my/system/

    I decided to change the name of the system folder to “test”, and updated index.php and admin.php accordingly. After these changes, I couldn’t access the CP using this URL

    http://domain.my/test/

    Which gave me the following message

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

    But, if I used admin.php like so

    http://domain.my/admin.php

    I had access to the CP again.

    Is this expected behaviour??? I usually don’t use / rename admin.php (I actually delete it from my installs) and access the CP using just my renamed system folder URL, so that “new” behaviour really baffled me. I had to think for several minutes before thinking about accessing my CP using admin.php.

     

  • #2 / Jan 26, 2012 6:03pm

    Kevin Smith

    4784 posts

    Hi jeromecoupe,

    No, that’s not expected. When you say you updated index.php, which index.php did you update? The one in your web root or in your system folder? The one in the system folder shouldn’t need to be updated—just the one in your web root.

  • #3 / Jan 27, 2012 8:04am

    Jérôme Coupé

    122 posts

    Hi Kevin,

    Just edited the index.php file in the webroot as usual.

    I just ran a couple of tests using another MAMP at work. Bear with me.

    If you install EE and change the name of the system folder prior to running the install wizard, everything is fine and you can access the CP using both the admin.php file and by pointing to the systemfolder

    http://www.localdomain.my/admin.php
    http://www.localdomain.my/systemfolder/

    If you install EE using the generic “system” folder, run the install wizard and then try to change the name of the folder, you can only access the CP via the admin.php file. Trying to get in using just http://www.localdomain.my/systemfolder/ throws an error at you:

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

    1. This is using a vanilla 2.4 install on MAMP (the free version, not MAMP pro) no .htaccess or anything like that in place
    2. PHP Version 5.2.17 and MySQL version 5.5.9
    3. no problem for me, now that I know I have to change systemfolder name prior to running the wizard. IMHO this could create confusion for newbies.
    4. Can you reproduce that on your end ? If you can, should I submit a bug report ?

  • #4 / Jan 27, 2012 1:17pm

    mattgreen110

    46 posts

    same happened to me

  • #5 / Jan 31, 2012 4:49pm

    Kevin Smith

    4784 posts

    jeromecoupe, sounds like you did some pretty good sleuth work! Yes, please file a bug report on this. It’s easy to avoid, sure, but like you said, it’s a nasty trap if you don’t know what went wrong. Filing a bug will get it in front of our devs’ eyes and we’ll work on making that a better experience.

    Is there anything else I can do to help?

  • #6 / Feb 01, 2012 4:32am

    Jérôme Coupé

    122 posts

    Hi Kevin,

    Bug report filed. Thanks for looking into this.

  • #7 / Feb 01, 2012 4:26pm

    Kevin Smith

    4784 posts

    jeromecoupe, let me keep troubleshooting with you on this. After I tried to reproduce it again, I wasn’t able to get it to fail. Must have been something else going on when I tried. From the bug thread, I see you followed these steps:

    Using MAMP
    Vanilla 2.4 install

    1. Use the system folder to get to the installer:
    http://www.test.my/system/ (I did it using admin.php as well and I get the same result)
    2. Install EE with the system folder named “system”
    3. I can connect to the CP using both http://www.test.my/admin.php and http://www.test.my/system/
    4. Change the name of the system folder to “pouet”
    5. Edit config.php (root) and admin.php > replace $system_path = ‘./system’; by $system_path = ‘./pouet’;
    6. Can access the CP using http://www.test.my/admin.php but not using http://www.test.my/pouet/ The following error gets thrown at me: “Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php”
    7. If I switch everything back to “system”, I can log in to the CP using both methods again.

    I’m wondering if this might indeed me a MAMP-related issue. Could you try the same thing in another server environment to test? For example, if you have a CPanel setup somewhere that you could use, that should work just fine.

  • #8 / Feb 01, 2012 5:57pm

    Jérôme Coupé

    122 posts

    Hello Kevin,

    Tested it on a “real” server online and cannot reproduce the problem. Probably a MAMP thing. Still, it can be pretty annoying if you don’t know what’s going on, but I guess that rules it out as a bug per se.

  • #9 / Feb 02, 2012 7:20am

    Jérôme Coupé

    122 posts

    Hi Again,

    Upgraded MAMP to the latest version. Same problem with 2.4 when renaming system folder after running the installer. Tried an install with 2.3.1. Same problem.

    Since then, I have discovered that, if you restart both Apache and Mysql on MAMP after renaming folder, it suddenly works!

    Sorry about that and thanks for your help.

  • #10 / Feb 06, 2012 2:11pm

    Shane Eckert

    7174 posts

    Hello jeromecoupe,

    I am glad you are all sorted.

    Apache is notorious for needing a restart for configuration changes. I am glad you tried that.

    Thank you for using the ExpressionEngine forums!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases