Knowledgebase

Home » Item #381

Offline changes to data cause all front end pages to crash

Item: #381
Date: 24 Jan 2003
Applies to
v4
v5

Question

After I make some changes to my data offline and upload it, or after I upgrade my store, all the pages seem to have errors.

Why is this and how can I fix it?

Answer

CactuShop's config settings are held in application variables in the web server's memory. When the application first starts up (i.e. after the server is rebooted or when you first upload and run the first page of CactuShop), CactuShop creates these config setting variables using the values held in the tblCactuShopConfig table of the database. They will remain in the server's memory until the server restarts again, which may be weeks or even months.

When you make changes to the Access database offline and then upload it, or if you change config values on SQL Server direct in the tables, you are not updating the live config settings. You are simply updating the values in the database that will be used to generate the config values the next time the application restarts.

Users overwriting an existing installation with a new one often find problems because of this. Many pages on the new installation are looking for config settings that are in the database, but are not yet live on the server, hence the page gives an error. Generally they find that when they change the license number, the site works, but when they use the old license number, it crashes. This is because the config application variables include the license number as part of the name. When the license number is changed, CactuShop finds no existing config settings with the name it expects and so it creates them from the database. Consequently, everything runs fine.

To fix this problem, you simply need to force the config variables to be rebuilt from the ones in the database. You can either login to the back end and edit then submit any config setting (CactuShop always rebuilds the config settings after one is updated). Alternatively, from any page, pass this to the page in the URL bar:

?appvar=reset

For example:

default.asp?appvar=reset

This will clear any problems caused by the live config settings being out of date.

Can't find the answer you need? Click here to open a support ticket.

« Back