DB Screwup

Discussion in 'General' started by Spaetzle, Dec 22, 2011.

  1. Spaetzle

    Spaetzle Member HowtoForge Supporter

    When looking into some setting of a virtual site I found a problem today.
    At the "Co-Domains" tab of this domain a shows up belonging to another virtual site. The domain name shows up at the site it should appear on too.
    If I choose the link on the site the name should not show up, I get the dialog for setting the password of the database of a third site ....
    All links on the site wich should have the names are working correctly ...

    Anbody an idea how to fix this? I fear in just deleting the wrong entry as it points to a database which is in use.

    Example for the Problem:

    I have threevirtuals sites
    Domain1 should host Co-Domain SubDomain1. SubDomain1 shows up at Domain1 CO-Domains Tab.
    Domain2 does have a database called web16db1. Everything is OK here.
    Domain3 does (should) not have any Co-Domains but it shows an entry for SubDomain1. If I click on the IP here I get the dialog for changing settings of database web16_db1

    Best regards
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There must be a duplicate record in the isp_dep database table. This table holds the relations between records.

    1) Make a backup of the ispconfig database.
    2) Login with phpmyadmin to the ispconfig db and search for the website that shows the wrong link in the isp_isp_web table, write down the doc_id and doctype_id of that record.
    3) now search for the duplicate record. Replace 123 with the doc_id that you found in 2):

    select * from isp_dep, isp_isp_domain WHERE isp_dep.child_doc_id = isp_isp_domain.doc_id AND isp_dep.child_doctype_id = 1015 AND isp_dep.parent_doc_id = 111

    you will get several lines and one line for the wrong co-domain, note the dep_id of that wrong record and then delete the record with that id in the isp_dep table.
  3. Spaetzle

    Spaetzle Member HowtoForge Supporter

    It seems this did the trick. Thanks for helping.

Share This Page