VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: mountainfirebird on January 24, 2015, 02:01:48 AM

Title: Key folder in safepath unaccessible: 2 Warnings
Post by: mountainfirebird on January 24, 2015, 02:01:48 AM
I've been working with Shape5.com joomla templates for a couple years.

This is my first time using Virtuemart. I'm using the GCK store theme from Shape5.com with joomla 3.3.6. It came with VM2 preloaded.

I thought everything was set up right. I worked with authorize.net to make sure all the settings were correct. I set the site and store live at www.supplementsallnatural.com and tried to do a real live actual purchase test.

Everything looked and functioned ok but after selecting product, entering my shipping and billing info, I hit confirm order and got a blank white page. Nothing was processed.

I tried to find a solution for this and ended up updating Virtuemart. Then I read about how I should never update on a live site. Whoops.

Well now when I go to products page http://www.supplementsallnatural.com/index.php/products/tongkat-ali and click "Product Details" and click "Add to Cart" and click "Show Cart" I get the following messages:

Warning

Key folder in safepath unaccessible

Warning: file_put_contents(/150124.ini): failed to open stream: Permission denied in /home/supp99lement88/public_html/libraries/joomla/filesystem/file.php on line 431

Warning: file_put_contents(/150124.ini): failed to open stream: Permission denied in /home/supp99lement88/public_html/libraries/joomla/filesystem/file.php on line 431

Any ideas or directions?
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: mountainfirebird on January 24, 2015, 02:07:16 AM
I looked in the file.php filder and line 431 has the following content and I have no clue what it means or how its holding things up:

   431:         $ret = is_int(file_put_contents($file, $buffer)) ? true : false;

Looks like its part of a larger piece of code taking up 4 lines:

{
            $file = JPath::clean($file);
            $ret = is_int(file_put_contents($file, $buffer)) ? true : false;
         }
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: GJC Web Design on January 24, 2015, 03:06:26 AM
It sounds like your safe path - where your invoices are stored, normally above your public_html folder, is wrong or it permissions are incorrect.
Therefore when the script tries to write to that path it fails

Have you set your safe path correctly and given write permission to the php process?
If your just using what was set with the bundled template/VM it is probably completely wrong..

vm admin->cofig->config->templates  - Safe Path

look at e.g. your joomla temp path to figure out the correct safe path (absolute)
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: mountainfirebird on January 28, 2015, 01:33:34 AM
Does anyone have advice on this?
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: bluezeyes on January 28, 2015, 09:04:17 AM
Have you read GJCs answer?
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: GJC Web Design on January 28, 2015, 10:06:14 AM
I was just going to ask the same question...  must remember not to use invisible ink next time.....
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: bluezeyes on January 29, 2015, 05:00:22 AM
Quote from: GJC Web Design on January 28, 2015, 10:06:14 AM
I was just going to ask the same question...  must remember not to use invisible ink next time.....
Send free sun glasses within your next answer.. and they will be read!  8)
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: incolor on April 10, 2015, 05:08:20 AM
I just updated from J3.4 + VM 3.0.4 to VM 3.0.7, and I suddenly started getting this error:

Key folder in safepath unaccessible

My Safe Path is above webroot and writeable by www-data, and everything was working before the update except for a bug I found with custom fields and calculation rules. The update fixed that problem but created this new one.

I have checked, double-checked, and triple checked all paths and permissions. I've even created a new Safe Path with a new folder above webroot, and I continue to get the unaccessible error. The log is showing permission denied, but I can't figure out why since it's owned by www-data (Ubuntu) with permissions as 755. There were Invoices and Keys subdirectories in the original safe folder, so things were definitely working before the update.

PHP Warning:  file_put_contents(/150409.ini): failed to open stream: Permission denied

I also just got an order as I was typing this. The Safe Path directory is still empty.
Title: Re: Key folder in safepath unaccessible: 2 Warnings
Post by: jenkinhill on April 10, 2015, 12:22:57 PM
So you searched the forum a bit more to include 3.0.7 in the query and found the answer?   http://forum.virtuemart.net/index.php?topic=129246.msg444769#msg444769