Jump to content

Warning: xcache_isset(): XCache var cache was not initialized properly


Recommended Posts

I see this at initial install, and every page afterwards even after install.

 

Notice: XCache can't be used until `xcache.admin.enable_auth` is set to 0 in php.ini in /var/www/cc/classes/autoloader.class.php on line 130

 

Shouldn't the install script pick this up?

 

Ok, so I can go into the global PHP.ini for xcache and switch it off - but that is global.

Where is the best place to change this for CC only?

 

Link to comment
Share on other sites

There are a number of ways depending on server config etc..

 

If you create a file in the store root folder called ini-custom.inc.php it will be pulled into the ini.inc.php file. You can do that and add the content:

 

<?php
ini_set('xcache.admin.enable_auth', false);
Link to comment
Share on other sites

I'm using Turnkey LAMP VM image in a virtual box to test/stage this.    It is basically Debian - but pre-configured for specific scenarios - in this case, LAMP based apps like CC.  As this is really just Debian - you may want to put checks in your installer to sort this out.  I used the same to test a beta (either b1 or b2) of v6 - and never had this issue.  Don't know what has changed.

Link to comment
Share on other sites

Hi

CubeCart 6.0.1 works perfectly on a fresh install for me on a server running a brand new install (no configuration at all) of XCache.

I think there must be something different with the configuration of your server and / or XCache itself. Also as Al said, there is no reason why this should have changed between earlier beta versions and current release

Ian

Link to comment
Share on other sites

To be fair, I did re-download and re-install Turnkey - so it may well be a new version and changed though really - it is just Debian underneath.  I didn't install xcache - it was just there.

 

Nevertheless - it is an another scenario which needs to be catered for - surely CC can just ignore it?   Those first steps when a user first installs a product are critical - if they mess people about, most will just toss it aside and move on.

Link to comment
Share on other sites

it is just Debian underneath.  I didn't install xcache - it was just there.

 

Nevertheless - it is an another scenario which needs to be catered for - surely CC can just ignore it?   Those first steps when a user first installs a product are critical - if they mess people about, most will just toss it aside and move on.

I dont know about Debian so much, as we always use CENTOS / Red Hat, but I would doubt that XCache is installed by default on as it certainly isnt on CENTOS. Maybe the image that you installed from had it pre-installed and had it configured incorrectly.

A standard installation of XCache will run perfectly well on any system unless extremely heavly used when it might need some configuration. Therefore CubeCart will run perfectly if XCache is configured correctly - you cannot program one system to take account of issues in another !

Also remember that 99.99% of people will never be installing XCache themselves or even have a clue whether it is installed on their hosting server or not !

Ian

Link to comment
Share on other sites

most will just toss it aside and move on

Can't agree more which is why a GitHub issue has been opened. Even if this only affects a very small minority.

This really isnt a CubeCart issue - there are certain configuration settings that need to be done with XCache when it is first installed on a server in order to get it working and var cache size is one of those as the default is set to use zero bytes of memory. It isnt that CubCart cannot work with those default settings, nothing will.

Ian

Link to comment
Share on other sites

If it will work with or without xcache, maybe CC should just ignore it if not configured rather than give an error.

 

I had to change the following in the xcache.ini file:

 

[xcache.admin]
xcache.admin.enable_auth = On
 

[xcache]

xcache.var_size  =            100M
 

Link to comment
Share on other sites

If it will work with or without xcache, maybe CC should just ignore it if not configured rather than give an error.

If you have xcache or APC installed on the server it will try to use them and if not fallback to using the files method. Yes I suppose it could check whether the server admin has configured it correctly but where do you stop if you start doing that - how many checks for installation / correct configuration of components do you start doing. In my opinion this is not something CubeCart or any application should be doing - it bloats and slows down the application for something that should never happen if xcache is installed correctly

I had to change the following in the xcache.ini file:

 

[xcache.admin]

xcache.admin.enable_auth = On

 

[xcache]

xcache.var_size  =            100M

xcache.admin.enable_auth = On will be specific to each server installation and xcache.var_size is one of two variables that HAVE to be configured before it will EVER work and are always done by sys admins when installing / configuring xcache

Ian

Link to comment
Share on other sites

IMHO any good application should have excetption handling which caters any eventuality - particularly ones on open systems where you do not know how or what might be configured or installed.

 

CC already seems to check for xcache conditions - as it is CC which is presenting the error - so surely it could just say 'ah, a problem with xcache - we will just not use it'.

Link to comment
Share on other sites

Thanks everyone. I wonder if CC can configure XCache how it wants

This wouldnt be possible as server level settings are required.

IMHO any good application should have excetption handling which caters any eventuality - particularly ones on open systems where you do not know how or what might be configured or installed.

 

CC already seems to check for xcache conditions - as it is CC which is presenting the error - so surely it could just say 'ah, a problem with xcache - we will just not use it'.

To a certain degree, I agree regarding handling exceptions but dont believe this qualifies. An application has to make certain assumptions that underlying systems are configured correctly otherwise you would have a huge number of checks that would be unnecessary for 99.99% of the time. Any sys admin installing xcache would always configure a couple of these parameters so this situation would never happen on a properly configured system. If you say you should cater for incorrectky configured systems then you could have checks for hundreds of different things

Ian

Link to comment
Share on other sites

  • 2 months later...

So, did you code it that way? To my knowledge, I don't even have XCache and I'm getting the error. Can I just get rid of the error message and be assured that it has fallen back to files cache? I'm a newbie and don't mind having the notice on my dashboard page, but it's not what I want others seeing when they go to my sales pages.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...