CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • Two installs on the same machine
Pages: [1]

Author Topic: Two installs on the same machine  (Read 668 times)

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Two installs on the same machine
September 01, 2014, 01:07:54 am
Got a bit of bad news regarding my attempts to set up a 4.5 install.

This is probably to do with my configuration more than anything else, but I'm stumped.

(Future First has a heavily customised install).

Things that worked well:
Logging in to the CiviCRM and Drupal back ends - fine.
Really like the interface changes.
Searching by relationships - fine.
Searching by custom dates on relationships - not working (wasn't in 4.4.6 either, I'll log a bug against 4.5 if there isn't one already).

Things that don't work:
When logging in to our client dashboard as a teacher we get the following error:

Fatal error: Cannot redeclare class CRM_Futurefirst_veda_FF_utils in /var/www/html/prod/drupal-7.27/sites/default/extensions/uk.co.vedaconsulting.module.futurefirst/CRM/Futurefirst/veda_FF_utils.php on line 2 Call Stack: 0.0002 340148
1. {main}() /var/www/html/prod2/drupal-7.27/index.php:0 0.4173 42539152
2. menu_execute_active_handler() /var/www/html/prod2/drupal-7.27/index.php:21 0.5107 43176628
3. drupal_deliver_page() /var/www/html/prod2/drupal-7.27/includes/menu.inc:532 0.5107 43177004
4. drupal_deliver_html_page() /var/www/html/prod2/drupal-7.27/includes/common.inc:2563 0.5109 43177820
5. drupal_render_page() /var/www/html/prod2/drupal-7.27/includes/common.inc:2675 0.5132 43270740
6. block_page_build() /var/www/html/prod2/drupal-7.27/includes/common.inc:5741 0.5240 43311536
7. block_get_blocks_by_region() /var/www/html/prod2/drupal-7.27/modules/block/block.module:268 0.5240 43311700
8. block_list() /var/www/html/prod2/drupal-7.27/modules/block/block.module:318 0.5240 43311700
9. _block_render_blocks() /var/www/html/prod2/drupal-7.27/modules/block/block.module:686 0.5307 43323140 10. module_invoke() /var/www/html/prod2/drupal-7.27/modules/block/block.module:893 0.5307 43323588
11. call_user_func_array() /var/www/html/prod2/drupal-7.27/includes/module.inc:866 0.5307 43323840
12. school_dashboard_block_view() /var/www/html/prod2/drupal-7.27/includes/module.inc:0 0.5348 43531868
13. require_once('/var/www/html/prod2/drupal-7.27/sites/default/civicrm_custom_php/CRM/Report/Form/Alumni/Alumni.php') /var/www/html/prod2/drupal-7.27/sites/default/modules/custom/school_dashboard/school_dashboard.module:132 0.5547 45865012
14. require_once('/var/www/html/prod/drupal-7.27/sites/default/extensions/uk.co.vedaconsulting.module.futurefirst/CRM/Futurefirst/veda_FF_utils.php') /var/www/html/prod2/drupal-7.27/sites/default/civicrm_custom_php/CRM/Report/Form/Alumni/Alumni.php:4

I've changed everything I can think of, but it seems to be trying to include the code from the other local 4.4 install in the 4.5 install. Is there anything obvious that I'm missing here? This might be just our code, but I doubt it.

Is anyone else successfully running a 4.4 and a 4.5 install on the same machine?

Thanks,

JohnFF
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Two installs on the same machine
September 01, 2014, 01:30:25 am
Hey John thanks for taking a stab at testing.
Can you elaborate on what you mean by "the other local 4.4 install"?
Try asking your question on the new CiviCRM help site.

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Two installs on the same machine
September 01, 2014, 06:49:19 am
Dear Coleman,

I've been banging my head on this for weeks! I really want to have a 4.5 version up and running!

I have two installs on my laptop (with all data scrambled).

One, ffnew, uses prod < 4.4
The other ffnew2, uses prod2 < 4.5

I used to have a laptop with dozens of 4.2 installs set up. I remember there was a thread with someone struggling to have two 4.4 installs on the same machine, I wonder if an issue was introduced which is causing havoc?

Of course, it may be a civicrm.settings.php which I'm missing, where if it's not present it defaults to the... something?

Does anyone else have a 4.4 and a 4.5 running successfully on the same box?
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Two installs on the same machine
September 01, 2014, 06:56:49 am
Yes, I have many instances of CiviCRM running on my machine, and haven't run into problems. I've got 4.3, 4.4, and 4.5 running in a Drupal multisite, and also instanes of WP and Joomla both running 4.5. Actually I do vaguely recall getting that error message at one point after rearranging things but for the life of me I can't remember why it happened or how I fixed it. Sorry I know it would be more helpful if I could remember details, but you can at least take heart that the problem is solvable.
These are some things I would have done to try to fix it:
  • Delete the contents of templates_c for all instances
  • Ensure all instances have a unique civicrm.settings.php file
  • If the civicrm.settings.php file is in an unusual location (not sites/<sitename>/files) then you need a settings.location.php file within the civicrm root.
  • Use drush to clear civicrm cache for all instances - be sure you are in the right directory so that drush targets the right instance (I think this eventually was at least part of the solution for me)
« Last Edit: September 01, 2014, 06:58:32 am by Coleman Watts »
Try asking your question on the new CiviCRM help site.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Two installs on the same machine
September 02, 2014, 10:42:16 pm
Ditto Coleman's point.

Also, the error "Cannot redeclare class" means that two PHP files (with distinct-looking paths) declare the same class. This often turns out to be an issue with a misplaced symlink or backup folder. Generally, you might search for redundant files or symlinks (e.g. "rgrep -i CRM_Futurefirst_veda_FF_utils /var/www" or "find /var/www -iname veda_FF_utils.php" or "find /var/www -type l")

In this particular error, there's something unusual:

Quote
Cannot redeclare class CRM_Futurefirst_veda_FF_utils in /var/www/html/prod/drupal-7.27/sites/default/extensions/uk.co.vedaconsulting.module.futurefirst/CRM/Futurefirst/veda_FF_utils.php

If the classes use the default autoloader, then the "_" should map to "/", e.g.

  CRM_Futurefirst_veda_FF_utils => CRM/Futurefirst/veda/FF/utils.php
  CRM_Futurefirst_vedaffutils => CRM/Futurefirst/vedaffutils.php

But the error suggests that some "_"s aren't mapped to "/"s. That's odd -- you probably have some extra file-loading logic (e.g. a custom autoloader or a manual call to "require_once CRM/Futurefirst/veda/FF/utils.php"). That may merit some examination.

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Re: Two installs on the same machine
September 09, 2014, 08:24:51 am
I'm not sure if you ever resolved this. I was having what may be a similar problem. All my paths were updated, etc, but for some odd reason Civi 4.5 was still loading files from my other install with 4.4. I had cloned/upgraded from the other 4.4 installation.

I ended up renaming the 4.4 folder location, and refreshing everything on my 4.5 install (clearing cache, menu rebuild, etc). By doing this it somehow forced my 4.5 to look at the correct directories. I was able to set the 4.4 install location back to the original folder name and everything is working as expected.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • Two installs on the same machine

This forum was archived on 2017-11-26.