Re-Installation Of 3.0.6

I have started this thread because I am stuck and also because having this specific thread will help others later.

Due to a security scare my only option is to re-install but I need the new store to have access

to the data in my existing database.

I don't think the Store Import tool works in respect of 3.0.6 > 3.0.6

Presently…

I have the 3.0.6 distribution package inside a new folder under public_html

My current store is fully operational using, let's call it, database1.

Unzipping the new store via cpanel is easy and so is installing it.

My problem is not knowing exactly how to go about the database aspect.

I know that I can't simply point the new store at the existing database because

it will be wiped clean during installation.

Some very knowledgeable and helpful people have tried to help but I am

a computer dunce and their suggestions are not explicit enough.

God love them for trying to help me.



If anyone can provide a simple step by step guide with respect to the database

aspect of a re-installation procedure I will be ever so grateful, as will others

who can't find help in this situation.

Change your config.local.php to point to the OLD database after installation is complete making sure that you have proper db_user and db_pass credentials setup for that old DB.

OMG !!

I thought I couldn't use the original database again…lol

At least it won't take long since my divine revelation about

how fast cpanel is compared to ftp and I can unzip ON

the server.

Installation went well with the sample database but I didn't want to point my second cart

at my existing database.

Created a copy of current database but my trial cart just won't connect and I get

a single word 'error' in the top left. I even tried editing the authentication code to

the same used for my current installation.

I am not brave enough to point the trial cart at my existing database for fear of somehow

corrupting it.

Stuck…

unless of course, editing the config.local.php to point my trial cart at my existing database is safe

just to see if it connects before swapping the trial to live.

if you add


if( !defined('DEVELOPMENT') ) define('DEVELOPMENT', true);


to your config.local.php it will show you the DB error and you can react to that.

Now all I get is 'error_occured'.

Would it be safe to simply log out of my live store, edit config.local.php ( trial store )

and just 'try' to connect my trial store to my live store db ?

if you've defined development properly as above, you should not get “error occurred”.

I would not go beyond the admin login prompt if you are having 2 connections to the same DB. I would not try to open the customer view.



Just make a copy of your current DB and then connect your new install to the copy. If that all works, then you can do the swizzling needed to get the new install live with your old db.



Pen and paper are your friends for keeping track of what you're doing if you're not accustomed to doing this all the time.

I have been creating copies but maybe I have ticked the wrong boxes

because none have worked…

This where I placed the code you suggested.

// Developer configuration file

if (file_exists(DIR_ROOT . '/local_conf.php')) {

include(DIR_ROOT . '/local_conf.php');

if( !defined('DEVELOPMENT') ) define('DEVELOPMENT', true);

}

Change it to read:


// Developer configuration file
if (file_exists(DIR_ROOT . '/local_conf.php')) {
include(DIR_ROOT . '/local_conf.php');
}
if( !defined('DEVELOPMENT') ) define('DEVELOPMENT', true);




You had the define within the condition for local.conf.php so unless that file existed, the define never happened.

[color=#000000][font=Courier][size=3]Database error:[/size][/font] Table 'jxxxxxx_test.cscart_recurring_events' doesn't exist b[/b]

[font=Courier][size=3]Invalid query:[/size][/font] DELETE FROM cscart_recurring_events WHERE 1 AND cscart_recurring_events.event_type = 'M' AND cscart_recurring_events.timestamp < 1401307199[/color]

[color=#000000][font=Courier][size=3]Backtrace:[/size][/font][/color] File: /home/xxxxxx/public_html/NWSTR/core/fn.database.php Line: 267 Function: db_error File: /home/xxxxxx/public_html/NWSTR/addons/recurring_billing/func.php Line: 523 Function: db_query File: /home/jxxxxxx/public_html/NWSTR/addons/recurring_billing/controllers/admin/index.post.php Line: 25 Function: fn_get_recurring_events File: /home/xxxxxx/public_html/NWSTR/core/fn.control.php Line: 640 Function: include File: /home/jxxxxx/public_html/NWSTR/core/fn.control.php Line: 459 Function: fn_run_controller File: /home/jxxxxx/public_html/NWSTR/xxxxxdmin.php Line: 24 Function: fn_dispatch

Seems to be something related to the recurring billing addon. Looks like somehow your recurring_billing addon is enabled, but was never installed. Edit the cscart_addons table and change the field 'status' to 'D' and try again. But this is a little weird in that if it's enabled in your db, the table should exist.

Bingo !!

I have no use for Recurring Billing so I uninstalled it.

Oops…just noticed you said addons TABLE.

Uninstalling instead seems to have done the trick.

NOW DB works.

TYVM

Bingo !!..mostly.

No images displaying ( although present in the database ).

The database I copied for testing from my live site was about 10% smaller for some reason.

All permissions are fine and by the book.

Rather than start all over again…

Take live store offline.

Connect live store to CsCart's demo db then do nothing.

Connect my new installation to my existing live database to establish correct functionality.

If all good I would pack the current live store into a folder and move the fresh installation

to the root.