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 CiviContribute (Moderator: Donald Lobo) »
  • Valid Key Error when setting up Contribute. What is KEY?
Pages: [1] 2 3

Author Topic: Valid Key Error when setting up Contribute. What is KEY?  (Read 13631 times)

kimdang1

  • Guest
Valid Key Error when setting up Contribute. What is KEY?
May 08, 2007, 09:04:01 pm
I tried test-driving my contribution page but it keeps saying "Could not find valid Key"...

What Key is this?  The key I got from paypal that I inputed in teh civicrm.settings.php?

I don't know how to go in and change it so that there is a valid KEY.

I'm just trying to make the contributions thing work so that people can pay through paypal when they sign up for events through civicrmevents.

"Sorry. A non-recoverable error has occurred.

Could not find valid Key

Return to CiviCRM menu."


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: Valid Key Error when setting up Contribute. What is KEY?
May 08, 2007, 11:49:08 pm

Please give more information on your platform, civicrm version etc.

If joomla and on frontend make sure you have enabled sessions in index.php as documented here

http://wiki.civicrm.org/confluence/display/CRMDOC/Configuring+Front-end+Profile+Listings+and+Forms+in+Joomla%21+Sites

This is a session issue

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

kimdang1

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 09, 2007, 12:52:47 pm
I am using Drupal version 4 with Mysql version 4.1.

It's for civiCRM, I'm doing a test run of people paying for a registered event.

kimdang1

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 09, 2007, 12:54:34 pm
The Civicrm version is 1.7.beta.9327

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: Valid Key Error when setting up Contribute. What is KEY?
May 09, 2007, 01:11:24 pm

Can u get on IRC, we can help u debug the problem there. check http://civicrm.org/participate for irc details

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

GregoryHeller

  • I post occasionally
  • **
  • Posts: 73
  • Karma: 3
Re: Valid Key Error when setting up Contribute. What is KEY?
May 14, 2007, 05:39:54 pm
I am getting the same error.

Drupal 4.7 with  1.7.9379

We are using paypal web payments standard.

The error occurs after the first [continue] button.

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: Valid Key Error when setting up Contribute. What is KEY?
May 17, 2007, 05:35:29 pm


Gregory:

1. this is definitely a sessions issue and most likely something is messed up that anon users dont have sessions created

2. in the past when this has happened, the two potential causes are:

a. there is no entry for uid = 0 in your drupal users table (people delete it by mistake and/or user import module might be deleting it according to one IRC user)

OR

b. the host names dont match. so ensure that the CIVICRM_UF_BASEURL and $base_url (in drupal settings.php) have the same domain name. If base_url is not set, try setting it (not sure why it being unset causes it to fail, but it does :(

If either of this fixes the issue, please report back with what fixed it. If anyone knows why an unset base_url messes up anonymous cookies, please educate us :)
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dividespace

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 24, 2007, 11:43:27 pm
Hi,
I have been having this problem as well. Although I am no longer experience the problem I'm not certain why the problem has stopped, or if it will return. I just thought I'd share my experience in case it is helpful.

Here is my setup:

Drupal 5.1
CiviCRM 1.7.9379
mySQL 4.1
PHP 4.3.9-3.22

For the sessions table I have the following:

Code: [Select]
CREATE TABLE `sessions` (
        `uid` int unsigned NOT NULL,
        `sid` varchar(64) NOT NULL default '',
        `hostname` varchar(128) NOT NULL default '',
        `timestamp` int NOT NULL default '0',
        `cache` int NOT NULL default '0',
        `session` longtext,
        KEY uid (`uid`),
        PRIMARY KEY (`sid`),
        KEY timestamp (`timestamp`)
      ) /*!40100 DEFAULT CHARACTER SET UTF8 */;

I have the following base url settings. I do not have the absolute url because I am running SSL pages for contributions. Not sure if this makes a difference.

Code: [Select]
define( 'CIVICRM_UF_BASEURL'      , '/' );

Code: [Select]
   $base_url = '';

Here are my findings so far. I used firefox to administer and flush drupals' cache, and I am using IE to test a contribution membership page as an anonymous user. By the way, if I didn't get the "Could not find valid Key" everything works perfect, except for custom fields that should be set to default on, but that is a bug that I'll report after this.

I opened phpmyadmin and browsed the sessions table while I cleared the drupal cache as well as the IE cache. I then Emptied the sessions table. Then I visited the contribution page.

On some occasions the session field only has:

formsingle_tokens|a:0:{}

When I noticed that when my IP's session entry was blank, like above, and I clicked "Continue >>", knowing that the fields were blank and the validation should kick in, I would get the "Could not find valid Key" error.

I also noticed that the session row for one visitor to the site was also blank, i.e. formsingle_tokens|a:0:{}

I wish I knew more, or could help debug, but I'm not a programmer.

dividespace

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 25, 2007, 01:40:14 pm
This problem resurfaced when someone tested the live contribution page today as an anonymous user. I'm trying to figure out why the session table entry is empty on occasion. I'll report back here if I find anything.

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: Valid Key Error when setting up Contribute. What is KEY?
May 25, 2007, 05:56:16 pm

We had a similar issue on another site recently and debugged it a few minutes ago.

Make sure the drupal caching is disabled. CiviCRM and Drupal caching dont get along very well and causes problems :(

This is a known issues with Drupal caching. We are checking to see if this is resolved in 5.1

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

dividespace

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 26, 2007, 09:51:17 pm
Thanks Lobo. I have disabled the drupal cache. But, I would really rather have it turned on as the page loads are a bit better with the cache turned on. I'll keep my eyes on this and related issues to see when I can turn it back on.

Thanks again for such a great tool.

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: Valid Key Error when setting up Contribute. What is KEY?
May 26, 2007, 11:43:10 pm

Unfortunately drupal cache does not have an option to selectively turn off the cache for certain urls. ideally we would turn off the cache on all civicrm related pages. We rely on the session to store a fair amount of state when rendering a page and we use this information to process the page. Changing this is a significant architecture change at some core level PEAR libraries (HTML_QuickForm_Controller)

Please let us know if you've figured a work around

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

jarius

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 30, 2007, 04:37:01 pm
Drupal 5.1
CiviCRM 1.7
PHP 5.2.1
MySQL 5.0
Fresh install with sample data.

Same errors as above when doing SOME searches.

a) uid=0 exists
b) same URL
c) cashing turned OFF in Drupal

Any other ideas?


jarius

  • Guest
Re: Valid Key Error when setting up Contribute. What is KEY?
May 31, 2007, 07:15:35 pm
Any ideas of where I should look next?

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Valid Key Error when setting up Contribute. What is KEY?
June 01, 2007, 03:28:58 am
Can you obfuscate passwords and post your civicrm.settings.php here?

Do you see any common elements in these searches which case an error? If there is an error in the code for specific kind of searches, you should be able to reproduce it on demo.civicrm.org.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Pages: [1] 2 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Valid Key Error when setting up Contribute. What is KEY?

This forum was archived on 2017-11-26.