Several problems duplicating elgg installation

Hello.

I'm trying to duplicate an elgg installation for having a test.mydomain.com where to try new mods and stuff.

I'm stuck at some point, very close to have the duplication working, but don't know what or where...

---

+ I Followed the process described in here: http://docs.elgg.org/wiki/DuplicateInstallation

+ I created a subdomain test.mydomain.com, pointing to a new server folder: /var/www/test_mydomain_com

  • Installed fresh elgg (same version than original: 1.8.19)
  • Copied original Data folder from var/www/data to /var/installations/test/data (I want to have more than one test clones for different purposes, so will create var/installations/test... /test2, etc), in order to avoid conflicts among both data folders, and especified the new path in the installation wizard.
  • Imported original DB into new one, and changed urls to new one, as described in the docs.
  • Copied all mods from original to test.
  • Upgraded.

---

Errors found:

  • Notifications not working. Log returns: "[Thu Nov 06 21:13:26 2014] [error] [client 13.138.22.105] PHP WARNING: 2014-11-06 21:13:26 (CET): "file_get_contents(/var/www/test_mydomain_com/2014/10/10/5931/icons/7619medium.jpg): failed to open stream: No such file or directory" in file /var/www/test_mydomain_com/engine/classes/ElggDiskFilestore.php (line 234)"
     
  • urls: instead of urls like "https://test.mydomain.com/activity" now I get urls like: "https://test.mydomain.com/engine/handlers/page_handler.php?handler=activity"
     
  • when trying to send a message i receive the following notification: "Form is missing __token or __ts fields". but when checking if it is mod_rewrite problem (http://docs.elgg.org/wiki/Form_is_missing_token_or_ts_fields), it returns everything is ok.
     
  • Accessing to Plugins admin page, display many popup errors: "live_notifications (guid: 1005) cannot start and has been deactivated. Reason: Cannot include start.php for plugin live_notifications (guid: 1005) at /var/www/test_mydomain_com/mod/live_notifications".
     
  • When trying to deactivate mods from admin, it returns a page with the following error: Fatal error: Call to a member function getID() on a non-object in /var/www/test_mydomain_com/actions/admin/plugins/deactivate.php on line 49
     
  • ... and so on.
  • It looks like you've set dataroot to be /var/www/test_mydomain_com/ even though you mentioned, you wanted it to be /var/installations/test/data/

    Double check that mod_rewrite is present and you have .htaccess properly set up.

  • Hi @Srokap. Thank you. why you say I've set dataroot wrong?

    .htaccess has been copied from one installation to another, exactly the same.

    One point is that this time we did with fresh install. Before this, we tried by copying everything (directories, data and Db), with exactly the same problems.

    I think the problem may be with:

    1. Database.
    2. Data folder placement.
    3. Some Plugins.

    But still don't know how to find out, as I checked everything many times...

  • You wrote one of the errors was:

    "file_get_contents(/var/www/test_mydomain_com/2014/10/10/5931/icons/7619medium.jpg): failed to open stream: No such file or directory" in file /var/www/test_mydomain_com/engine/classes/ElggDiskFilestore.php (line 234)"

    That would mean that your data root is configured to be /var/www/test_mydomain_com/ which is wrong! You said you wanted to use  /var/installations/test/data/ as data root. You need to fix it.

    From what you wrote, you should have:

    • wwwroot (aka. path) set to /var/www/test_mydomain_com/
    • dataroot set to /var/installations/test/data/

    If you don't know how to change them, look at http://docs.elgg.org/wiki/DuplicateInstallation#Database_Entries

    That's obvious mistake that you need to fix before digging further.

  • Ok, fixed.

    My data root path was well set, the issue was that I set the folder name: "test_data" which doesn't work instead of simply "data"...

    So long to find out it was so simple.

    Thanks for the ideas.