Forums / Installing on a Linux/Unix Server / No admin after DB restore

No admin after DB restore

Views: 1,172

Results 1 to 9 of 9
21 May 2011, 3:56 PM
#1
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

No admin after DB restore

Hi,
My friends old (1.3.8) webshop got hacked and most of the files got deleted.
(Yes I know I should have updated earlier, but I never found time to do so:(), but hey I am doing this in spare time for him without expecting anything in return. I just was to busy with my normal job:S (Thats the reason my own foto webshop is also of line)

Now I find myself in some trouble.
What I have is :

  • a copy of the database,
  • a copy of the uploaded images folder,
  • a copy of the template I modified
  • a copy the language folder where I did some text customizations for him in the past when I set up hes shop.
    I backed up those not long ago.

What I tried is

  1. I created a folder on the server webshop2 and copied all install files from the latest 1.9 install there
  2. I created a new database and restored from the backup
  3. I opened the link to the webshop and I went trough the install procedure where I also had to enter all info like database user PW and shop owner and so.
  4. I told not to install the example database and I saw the shop online with the warning for removing zs_install ( which I did)
  5. I renamed the admin folder and edited the configure.php in the admin/includes folder
  6. I opened the new admin page and I got the normal login.
    So far anything looks OK
    But i found that the restored dbase was over written with default data.
    I did a drop all in phpmyadmin and imported the backup database again. Which looks OK.
    BUT when I go to the admin URL I get a blank screen:wacko:
    I tried the whole procedure again from scratch and the result is the same. :frusty:

I see the browser is looking for
http://www.luxim.nl/otheradmin/login.php but the page source shows empty. (off course this URL is not working now as I have the domain pointing at the original folder again and this folder does not exist there

One remark is that the original webshop was using a dutch language file and I had set the original in maintenance before I made the backup.

I am going on vacation in a few days and I would like to give my friend some working webshop again.

So is there anyone that could point me to a solution?

Mr Bert
Two of the shops I worked on:
http://stockphoto.mrbertdesign.nl/
http://www.luxim.nl

21 May 2011, 4:32 PM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: No admin after DB restore

What you need to do is first install 1.3.9h as a new install. When finished, do not rename Admin dir. nor delete the 'zc_install' dir.

Then you Import the old database and once again run the 'zc_install' only this time, you choose Database Upgrade. Now you remove the 'zc_install' dir. and rename the Admin dir. -- making sure to edit the Admin config file accordingly. And when ready to login to the Admin dir., remember to use the new Admin name in the URL and use the "old Admin login".

Then there are two areas you need to update:

Admin > Configuration > Logging: Log Destination

Admin > Configuration > Sessions: Session Directory

Change both the above to use the correct path for the new location.

Let us know how the above works out for you.

The learning is in the doing.

Potent Products

22 May 2011, 12:26 PM
#3
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: No admin after DB restore

Hi Rob
I did as you explained as far as I understand it.
but there are two parts that are not clear to me.
You wrote:

*Then there are two areas you need to update:

Admin > Configuration > Logging: Log Destination
Admin > Configuration > Sessions: Session Directory*

But I have no clue where to find those two areas:S
is this in one of the configuration files?

When I open the website I get a red line
TEXT_ADMIN_DOWN_FOR_MAINTENANCE

At this moment I still see the empty page when I try to open the new admin page. I do not get any error message.

The zencart version is 1.3.9h

Mr Bert
Two of the shops I worked on:
http://stockphoto.mrbertdesign.nl/
http://www.luxim.nl

22 May 2011, 12:57 PM
#4
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: No admin after DB restore

I uploaded a Dutch language pack and the imaged and template for the shop and it looks mostly normal again, but of course the shop is still down for maintenance. I added some info on the down for maintenance so customers can reach the shop owners:)The shop I am working on is www.luxim.nl
But I also see a strange message under welkom bij luxim

I still cannot go into the admin page. I still get the empty page.

Mr Bert
Two of the shops I worked on:
http://stockphoto.mrbertdesign.nl/
http://www.luxim.nl

22 May 2011, 1:08 PM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: No admin after DB restore

The two areas I mentioned are within the Admin dir. If you cannot access it then use your FTP program and check the 'cache' dir. for any "mydebug...." files; which would detail any errors found. You could also check the errors logs as provided within your hosting account, to see if they shed any light on what is going on.

The learning is in the doing.

Potent Products

22 May 2011, 4:35 PM
#6
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: No admin after DB restore

Hi, Do you mean the files in luxim/cache?

Mr Bert
Two of the shops I worked on:
http://stockphoto.mrbertdesign.nl/
http://www.luxim.nl

22 May 2011, 4:44 PM
#7
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: No admin after DB restore

As you have installed the new site in a folder the location of the logging and session folders will have changed. As you cannot get into your renamed 'admin' folder to alter them you need to do it via phpMyAdmin.

In phpMyAdmin click on the 'configuration' table and then go through it until you find those two entries, and edit them by adding the new folder to their pathways. The location of the 'cache' folder also needs to be changed, but you do that in the two configure.php files.

Until you do change the location of the 'cache' directory in the new website's configure.php files you won't find any error messages there which can help you to pinpoint the other problem you have.

Vger

22 May 2011, 7:02 PM
#8
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: No admin after DB restore

Hi Vgir this confuses me:S

I looked in the configuration table and did only find a record session directory pointing at w/www/zen/cache.
However I see some info in the cache folder and I see there some files named mydebug......... But time stamp is probably from the server and not local time so hard to recognize.

So I need to try again tomorrow I am afraid. I had to go for dinner with my wife and with some wine it is bad working o fix a shop;)
I just found out that I am the only person that could see the content of the shop and the message that I wrote:(
I hoped customers could still browse the shop and make a call to order

Mr Bert
Two of the shops I worked on:
http://stockphoto.mrbertdesign.nl/
http://www.luxim.nl

22 May 2011, 7:56 PM
#9
mrbert avatar

mrbert

New Zenner

Join Date:
Jan 2007
Location:
Rotterdam NL
Posts:
76
Plugin Contributions:
0

Re: No admin after DB restore

OK got much further now, i could not resist trying:)

I got the admin up and running:)
Also some strange error messages have disappeared

Looking at the mydebug info showed trhat I missed info in the language section of admin.
So things are progressing thanks to the support I got with the tips from Rob:clap:.
So the shop looks much better :)
still a few things to solve
when i look at https://www.luxim.nl I see things that I altered in the previous install. ( I hard coded them that time but maybe there is a better way?)
In the left column box "meer info"I had changed pagina2, pagina3, pagina 4 to more meaningful descriptions.
Also the text in the center was different and I probably changed them also so i need to do some searching to find these. I hope I can with the page editor and that I do not need to do manual hard coding;)

Mr Bert
Two of the shops I worked on:
http://stockphoto.mrbertdesign.nl/
http://www.luxim.nl