12 replies [Last post]
jwant's picture
Offline
Joined: 10/08/2009
Juice: 67
Was this information Helpful?

Hi,

On the Review Order page, this error is present. "Ubercart cannot find a necessary encryption key. Refer to the store admin dashboard to isolate which one."

We've configured the credit card settings (admin/store/settings/payment/edit/methods) according to http://www.ubercart.org/docs/user/2731/credit_card_settings, and have resolved previous open_basedir errors by creating Keys directory and giving appropriate permissions.

Error returns when using the test gateway and authorize.net gateway. Authorize.net gateway is configured with API Login ID and new Transaction Key. I think the payment gateway is configure correctly because the completed transaction generates a email receipt from authorize.net

We can't find anything in the documentation related to "encryption key", merely the encryption key file path. We're starting to wonder if something is missing, and we need to reninstall Ubercart and its contributed modules.

These threads did help us:
http://www.ubercart.org/forum/support/13286/encryption_issues
http://www.ubercart.org/forum/support/7132/credit_card_encryption_and_te...
http://www.ubercart.org/forum/support/6790/encryption_key_file_path_issue

Any help would be greatly appreciated.
jwant

jasonabc's picture
Offline
Uber Donor
Joined: 05/05/2008
Juice: 573
Re: Ubercart cannot find a necessary encryption key.

this is usually a path and/or permissions problem. I have my store served out of a /mysite/public/ folder. At the same level as the public folder - I have a /mysite/private/ folder. My Card number encryption key filepath value is set to this:

../private

You have to also ensure that UberCart has write permissions on that directory so it can create the encryption key inside it.

jwant's picture
Offline
Joined: 10/08/2009
Juice: 67
Absolute File Path

Hi,

Thanks for your response. We replaced the relative file path ../keys with the absolute file path. And presto, it's working!

Thanks,
jwant

bradezone's picture
Offline
Joined: 12/02/2009
Juice: 23
Re: Absolute File Path

This error message started to appear once we used the "secure pages" module to force our checkout pages to go through https, even though the checkout process actually works fine. Is this a known issue? Because it would be great for that message not to show when someone is checking out on the site. And I can't just set "display:none" on those error messages, since they may have form errors while checking out.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Absolute File Path

We're using Secure Pages and I've never seen this happen before. You might check your Watchdog or Apache error logs to see what the issue could be - because chances are your customers won't be able to checkout with a credit card if that error is present.

And yes, using CSS to hide those messages is bad form.

--
Help directly fund development: Donate via PayPal!

robbie's picture
Offline
Joined: 03/17/2010
Juice: 107
Re: Absolute File Path

Yes using absolute path seemed to have helped ubercart to find the folder and successfully created the uc_credit.key. Thanks!

bharath.sangam's picture
Offline
Joined: 03/30/2011
Juice: 5
Ubercart cannot find a necessary encryption key.

i have given the write permissions and correct path, even though it throws an error Ubercart cannot find a necessary encryption key.

rounder13's picture
Offline
Joined: 07/19/2009
Juice: 75
Re: Ubercart cannot find a necessary encryption key.

I started getting this error all of a sudden
Ubercart cannot find a necessary encryption key. Refer to the store admin dashboard to isolate which one.
its blowing my mind because I set up the key and everything was working fine for days and not even customers see the error... the site is live:(

Dave Keays's picture
Offline
Joined: 06/30/2008
Juice: 37
cannot find encryption key with a server switch

Ok, I just started getting this error earlier this week. This site was set-up and almost live on one server when the client decided to switch it to another. I just migrated the file system and database across and purchases another cert thinking I could get it up and running. No go. Https is ok.

I set-up the directory according to your directions.

- I was getting a message in checkout that the directory didn't exist until I changed the path entered as '../../key' or the absolute equiv.

- I was getting a message in checkout that the key wasn't found until I changed the owner to the same as the Apache2 daemon.

- Now I'm getting the message that the key wasn't found in the 'review order' screen.

I assume this has something to do with the server switch.

Dave Keays's picture
Offline
Joined: 06/30/2008
Juice: 37
possible cause

What I assume is happening is that since the encryption process was completed on the other server, and I migrated the whole database over from one server to another. So whatever flags it as completed was migrated also, and since it can't be redone I am not able to enter the new certificate information. Maybe I should start from a new Ubercart installation?

"Once you do this, you won't be able to do it again." -credit_card_settings#security

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: possible cause

@Dave Keays: Your problem sounds like http://drupal.org/node/699558

You could try deleting the uc_credit_encryption_path variable in the database table "variable", then try re-configuring your encryption keypath from the Ubercart admin menu. I would make a copy of your key file and put it out of the way before you do this.

<tr>.
Jay Matwichuk's picture
Offline
Joined: 02/15/2010
Juice: 171
Re: Re: possible cause

I was having the same issue. The folder in question was readable, writable, and executable by any user. The path was set right, yet it just didn't like the path.

What I did was change the name of the folder from 'key' to 'keys', then changed the path on the settings page, and re-saved. Worked like a charm.

liquidcms's picture
Offline
Joined: 09/13/2010
Juice: 28
when CC disabled

i get this error even when Credit Card processing is disabled.