15 replies [Last post]
va20008's picture
Offline
Joined: 07/16/2008
Juice: 3
Was this information Helpful?

At "admin/store/settings/payment/edit/methods" page, I always get an error message of "You have specified a non-existent directory" for my input at the "Card number encryption key filepath" box.

Can someone help solve this issue? Thanks

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Need help on Credit Card Setting:

Refer to the CC documentation for a little more info:

http://www.ubercart.org/docs/user/2731/credit_card_settings

Jaclyn's picture
Offline
Joined: 09/25/2008
Juice: 36
need help with credit card encryption

I have reviewed the CC documentation several times.

I created a keys folder outside of the documentroot public_html folder.
I also created a keys folder within the private_html folder, as the private_html folder holds the security certificate

However, i keep getting a "You have specified a non-existent directory." I dont understand where i am going wrong.

i have entered the following relative paths

../../keys
../keys
/keys
keys
domains/chestnutsandpapaya.com/private_html/keys
domains/chestnutsandpapaya.com/keys
chestnutsa/keys
chestnutsandpapaya.com/keys

i guess i dont know what to put in the ".."

what am i missing?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: need help with credit card encryption

Hmm... might be you're not missing anything. Perhaps it's a permissions issue? I think we decided a chmod of 644 on the directory was good enough... but maybe it was 666. Puzzled Fiddle with those some and see if that fixes it.

macographer's picture
Offline
Joined: 12/02/2008
Juice: 4
Same problem, permissions correct

Is there a chance there is another problem? I'm having the same problem, and the directory permissions are 755.

I don't get the error when I set the directory to "files" or any other path in a public directory, but after creating a directory outside the public directory with the same user as the public directory, I get an error.

daniel sanchez@drupal.org's picture
Offline
Joined: 07/23/2008
Juice: 2
Re: Need help on Credit Card Setting:

It took me a few times reading it to understand too.
What you need to do is create a folder named 'keys' somewhere off of your 'www'/'public_html' folder.
Then specify the path in the www.yoursite.com/admin/store/settings/payment/edit/methods page. Look under Credit Card Settings.
Mine looks like this: /home/myaccountname/store/keys

hope this helped.

Axel_Pressbutton's picture
Offline
Joined: 11/30/2008
Juice: 123
Re: Need help on Credit Card Setting:

This is one of the errors I recently encountered (amongst others) - I don't suppose your site is using basic auth? Mine was and it was this that caused a whole bunch of /keys/ issues.

If you are using it, try without and see if that helps. I'm going to leave basic auth on and remove it when I need to do any CC work.

Snarkive's picture
Offline
Joined: 01/11/2009
Juice: 4
Same issue here, and none of these suggestions got it fixed.

Hoping that bumping this question will get me some insight. I'm having the same issue, and I've taken all of the suggestions above. Followed the steps in the documentation, changed security levels, all that. Still, it tells me the directory doesn't exist, when in fact it does.

I have to be doing something wrong, but I can't for the life of me figure out what. Everything else to do with Ubercart is functional (and extremely easy to use and administer). Is there any extra help that can be provided?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Same issue here, and none of these suggestions got it fixed.

What are your chmod settings for that directory? You can always set the permissions to 777 while it creates the key file and then demote the permissions after the fact... I think PHP needs the execute permission on these files so it can check if the files exist. Puzzled

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: Re: Same issue here, and none of these suggestions got it fi

Also check your host settings. Some shared hosting providers set the open_basedir directive for PHP, which prevents a web application from accessing folders outside your web root. See http://us3.php.net/manual/en/ini.sect.safe-mode.php .

<tr>.
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Same issue here, and none of these suggestions got i

Ahh, yeah... I should post up some docs on what to do in that situation. You can use an obscure directory in your document root and protect the .key file with .htaccess. Worst case scenario, there's not much someone can do even if they get your key... but this really should keep it safe.

Snarkive's picture
Offline
Joined: 01/11/2009
Juice: 4
Re: Re: Re: Re: Same issue here, and none of these suggestions g

Done, done, and fixed. It worked, and it worked even better once I eliminated the small amount of user stupidity involved.

Thank you!

flyinfella's picture
Offline
Joined: 04/08/2009
Juice: 7
Hello Ryan, I have a

Hello Ryan,

I have a question on your post here, about protecting the .key file with .htaccess.

I am in the situation where my shared hosting will not let me create a folder above my root directory(I hope I explained that right), I can create /home /www /keys, but not /home /keys.

I tried two options for the placement of the key files. One being /www /keys, which was saved successfully in my CC settings(but I believe would not be encrypted). The second on suggestion by my hosting company was to create a subdomain secure.mysite.com and uploading a second ssl certificate to it and creating .keys in it.

Is either of these acceptable? Or should I pursue the .htaccess route?(Which I would need help with)

I changed my settings back to the /www /keys, and saved that in my credit card settings, and I am still getting the red X in my store admin saying I need to setup my encryption settings.

Thanks in advance for anyone's opinion,
Victor

aneesh's picture
Offline
Joined: 09/10/2009
Juice: 4
how to give the file path

Hello,

my drupal installaton structure is like /home/wsw/www <-- drupal is installed in www.

i have created a keys folder with all permissions like /home/wsw/keys

wsw is the subdomain and document root is home/wsw/www

but while i am setting the file path its giving error
/*
You have specified a non-existent directory.
*/

i have given the path like ../keys

can any one please guide me on this.

Thanks in advance
Aneesh

JFreed's picture
Offline
Joined: 05/06/2009
Juice: 8
Re: Need help on Credit Card Setting:

Having fought long and hard to try and get the keys dir to work out of the httpdocs dir I eventualy gave up and created the key in an obscure dir and amended the .htaccess as follows. I hope people think this is secure enough and if so people find it useful.

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|key|
rerooting's picture
Offline
Joined: 09/16/2010
Juice: 16
Cannot enter directory

My issue seems to be a bit different. I have root access to the directory on a dedicated server, however I cannot enter the encryption information. It tells me:

Card number encryption key filepath:
Not configured, see below.

Does this mean it does not detect a directory that is prepared and enabled? Or does it mean I have incorrectly installed and/or enabled the ubercart credit card payment module?

A piece of info: My client had had someone do a hackup job of trying to get SSL certs to work on the server before, and had left the credit card module enabled and the credit card payment option enabled for probably at least a year. Could this be impacting the settings?