Failed to open stream: Permission denied

When I'm click add to cart button then add product, but problem is when I'm not choose the product and remove product this type of following error :

""Warning: file_put_contents(..../vqmod/checked.cache): failed to open stream: Permission denied in ~/vqmod/vqmod.php (Line 135)""

This happened only one product choose and remove this.

What is the Solution.

Make sure your apache user has write access to your directories. Otherwise you need to manually chmod files and set write permissions one by one.

Here is a list of paths to make sure they have write permissions:

$paths = array(
'admin/.htaccess',
'admin/.htpasswd',
'admin/discussions.widget/discussions.cache',
'admin/addons.widget/addons.cache',
'cache/',
'data/',
'images/',
'includes/config.inc.php',
'vqmod/',
'vqmod/xml/',
'vqmod/vqcache/',
'vqmod/checked.cache',
'vqmod/mods.cache',
);

I happened to witness exactly the same list today. I was amazed. The checking function during the installation said »Ok», but it surely wasn't. Suddenly my windows was full of error messages. I almost postponed my LiteCart testing. It was very close getting back to my currrent Woo shop. :b

I think this permission list should definitely be in the Wiki. In »How to Install» section. Do you agree?

tim

LiteCart detects write permissions using is_writable(). It is possible Windows falsely reports it is writable when it's not.

You have full access to the wiki. Power to the people :)

I woudn't touch any Windows, except my dear Mac window grin. But something odd happened in installation and good grief I found that list.

Power to the people :)

…and give piece of chance. :)

Thank you very much. Unfortunately, I'm just a poor LC newbie with a lousy English. I wouldn't read the wiki written a guy like me.

tim

Oh I just assumed as you got "windows full of errors". Lol

I am very interested why is_writable() falsely reported true. And if there is a better way.

Nah your english is fine. Your misspelling is like any ordinary american. ;) Peace :)

I am very interested why is_writable() falsely reported true. And if there is a better way.

Maybe there should be a better way. I mean, a poor old merchant is dying to sale his items, not to adjust permissions. ;)

Which cross my mind: installing (certain softwares) by using Softaculous is very easy. A couple of clicks. How do they do it?

tim

I don't know how they do it. Their code is proprietary. :(

I'm sure you don't have this issue on an industry standard linux web server. Otherwise I should have heard of this before.

Ezt a témát a hosszú inaktivitás miatt bezártuk. A hozzászólás nem lehetséges.
View code on GitHub