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) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php script fails with external CiviCRM database
Pages: [1]

Author Topic: UpdateMembershipRecord.php script fails with external CiviCRM database  (Read 812 times)

minbori

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 2
  • CiviCRM version: 4.0.8
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.3.29
UpdateMembershipRecord.php script fails with external CiviCRM database
August 01, 2012, 08:30:22 am
Greetings all, I'm trying to get the UpdateMembershipRecord.php script working and am running into the following error:

Code: [Select]
DB Error: no such table
SELECT u.* FROM jos_users u WHERE LOWER(u.username) = 'admin' AND u.block = 0 [nativecode=1146 ** Table 'civicrmdb.jos_users' doesn't exist]

I am running CiviCRM in a Joomla environment where the CiviCRM has its own database.  The script is looking in the CiviCRM database for the Joomla user table, and of course doesn't find it!

Two questions:
1. Where do I correct the configuration to make the script look in the correct database?
2. Are there any other changes I need to make to the script to accommodate the CMS and CiviCRM data being located in separate databases?

Thanks in advance!

minbori

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 2
  • CiviCRM version: 4.0.8
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.3.29
Re: UpdateMembershipRecord.php script fails with external CiviCRM database
August 01, 2012, 08:33:08 am
As soon as I posted this I realized this must be the authentication failing, not the actual data update.  As far as I can tell the script never needs to touch the jos_users table to update the membership statuses.

Still the question remains....how do I authenticate a user to run this script when the user credentials are not in the CiviCRM database, but in the CMS database?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembershipRecord.php script fails with external CiviCRM database
August 01, 2012, 02:33:14 pm

In recent 4.1+ versions, we've switched and are using CMS specific calls (and hence the CMS chooses the DB and query appropriately) for all interactions with the CMS DB.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

minbori

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 2
  • CiviCRM version: 4.0.8
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.3.29
Re: UpdateMembershipRecord.php script fails with external CiviCRM database
August 02, 2012, 12:35:11 am
Um....ok, so that means I can't use this script until I upgrade to 4.1?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php script fails with external CiviCRM database

This forum was archived on 2017-11-26.