Problem after reinstall.

12 posts by 3 authors in: Forums > CMS Builder
Last Post: February 17, 2010   (RSS)

By Bassman - February 10, 2010

My installation of CMS Builder has been working great - until the server we were hosted on got hacked. The server was wiped clean of all files, but fortunately the database was left untouched. I reinstalled my site - and CMS Builder - but my installation shows nothing, although it connects to the database and I can see all the tables in the database through PHPMyAdmin and if I try recreating one of my editors using the name of an existing one I get the "Name already in use" message.

What should I do to connect to the dtatbase?

Re: [Donna] Problem after reinstall.

By Bassman - February 10, 2010

I've done that. Donna. Hope to have a suggestion soon :)

Re: [Bassman] Problem after reinstall.

By Dave - February 11, 2010

It sounds like you are missing your schema files from /cmsAdmin/data/schema/. Do you have a backup of those? If so try re-uploading them.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Problem after reinstall.

By Bassman - February 11, 2010

No I don't unfortunately, Dave. What now?

Re: [Bassman] Problem after reinstall.

By Dave - February 11, 2010

It's going to be a bit of work to restore, but possible. You need to re-create your sections to match what's in MySQL

You can't create a new section with the same name as an existing MySQL table, but there's a trick I'll show you to do it, and it should make your old fields available again.

First up, I recommend backing up MySQL if you can so you don't lose anything else.

Next, do you know your old table names? If not you can use the "MySQL Console" plugin or PHPMyAdmin if you have it and type in: SHOW TABLES

Once you know your tablenames, create a section with the same name as an old table but with a 2 on the end (eg: products2). Then go into /cmsAdmin/data/schema/ through FTP and rename the file to remove the 2.

When you go back to the field editor it should list all the mysql fields with unknown or none for the field type. For each field modify the field, give it a label and set the field type to "textfield" (or whatever it was). Only leave these fields as none: num, createdDate, createdByUserNum, lastUpdated, lastUpdatedByUserNum, dragSortOrder.

So that's the process, and I said, it's a bit of work. Let me know how it goes.

PS: You might want to double check with your host that they don't have any backups. Even older backups would give you a jump start on this process. You just need the files from /data/schema/

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Problem after reinstall.

By Bassman - February 11, 2010

Thanks Dave,
Yes, I understand the process. I have already restored one section of our site, thank you! The rest is going to be a hard slog but I know what to do and most of the rest will be pretty easy because most of the other schemas will almost identical.

Re: [Bassman] Problem after reinstall.

By Bassman - February 11, 2010

Dave, I do have another problem: When re-uploading photos that got deleted with the rest of the site (through the Admin section) I get this error:
Temp Upload dir '/var/virtual/webupload/' does't exist! Ask server admin to check 'upload_tmp_dir' setting in php.ini.

What have I missed?

Re: [Bassman] Problem after reinstall.

By Bassman - February 14, 2010

Any idea?

Re: [Bassman] Problem after reinstall.

By Dave - February 15, 2010

Hi Bassman,

It sounds like the temporary upload directory that PHP uses to receive uploads doesn't exist. Try creating it if possible or ask your server admin or web host to check the 'upload_tmp_dir' setting in php.ini and let them know you can't upload files through PHP.

Let me know how it goes.
Dave Edis - Senior Developer
interactivetools.com