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 CiviEvent (Moderator: Yashodha Chaku) »
  • Anonymous users cannot register, no valid session found
Pages: [1]

Author Topic: Anonymous users cannot register, no valid session found  (Read 1817 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Anonymous users cannot register, no valid session found
February 13, 2012, 09:26:19 pm
I have a free event with online registration that works, as long as the user is logged in.

When anonymous users submit the registration form, they get the error:
Sorry. A non-recoverable error has occurred.
We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site adminstrator for assistance.

Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.

Error type: Could not find a valid session key.
-------------------------------------

The back trace is:
/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 296
/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 246
/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 161
/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php, __construct, 45
/sites/all/modules/civicrm/CRM/Core/Invoke.php(219) : eval()'d code, __construct, 1
/sites/all/modules/civicrm/CRM/Core/Invoke.php, eval, 219
/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 347
, civicrm_invoke,
/includes/menu.inc, call_user_func_array, 348
/index.php, menu_execute_active_handler, 18



BTW: I have already checked the URL is exactly the same as the base URL, and is the same URL I used when successfully registering as an authenticated user.
« Last Edit: February 13, 2012, 09:37:15 pm by Sarah Gladstone »
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Anonymous users cannot register, no valid session found
February 14, 2012, 04:17:08 pm
Hi Sarah,

Per DGG at this old issue (http://issues.civicrm.org/jira/browse/CRM-1948):
Quote
This error can be caused by:
- Drupal caching enabled
- Missing record for Drupal user 0 (anonymous user)
- the host names dont match: the CIVICRM_UF_BASEURL and $base_url (in drupal settings.php) must 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.

Perhaps you recently reloaded the drupal database on this site from a mysqldump file? If so, that's a common time when user 0 will have uid changed to something else.  Solution is to find that record in the drupal `users` table in mysql, and change its uid to 0.  (This record is often listed first in the drupal `users` table if you don't sort the output; it's also identifiable by having empty values in all columns except uid.)

Also mentioned here: http://forum.civicrm.org/index.php/topic,173.msg4851.html#msg4851

- Allen
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Anonymous users cannot register, no valid session found
February 14, 2012, 07:11:19 pm
Found the issue and fixed it:   The Drupal users table did have a record for anonymous, with a UID of 0.  However, the "status" field was set to 0.   As soon as I changed the status field to 1, event registration and contribution pages started working again.

I am still wondering how the status field ended up as 0.
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Anonymous users cannot register, no valid session found

This forum was archived on 2017-11-26.