problem after upgrade from 2.2.8 to 2.2.9

Discussion in 'Installation/Configuration' started by smartcall, Jan 3, 2007.

  1. smartcall

    smartcall ISPConfig Developer

    Hello to all,

    I have the following BIG, I think, problem after upgrade.
    The database table isp_isp_web is empty. All the sites not working and options default users and all else value -1, boxes unchecked.

    When I try to edit any of them it gives similar error to this:

    This website already has 2 user(s). You cannot decrease the number of users.
    This website already has 2 domain(s). You cannot decrease the number of domains.
    This website already has 1 database(s). You cannot decrease the number of databases.

    And I'm not trying to decrease anything.
    Also the domain is empty.

    Any ideas how to make it work? Even manually - by adding values to the database table or anything else.
    It is a machine that I intended to put into production by the end of this week and it already has few sites.


  2. smartcall

    smartcall ISPConfig Developer


    additionally ISPConfig deleted the whole /var/www/*
    I use it with FC6 and everything was perfect before the upgrade

    It deletes the whole directory when I delete one site - i checked it by recreating /var/www and deleting one of the sites in ISPConfig.
    Last edited: Jan 3, 2007
  3. till

    till Super Moderator

    Never heard of that. What is the website root setting in ISPConfig?

    Maybe you had not enough space in /tmp or /root or the update was interrupted.

    Please have a look at your /tmp directory, there must be 2 tar.gz files with the Backup of the ISPConfig files and a .sql file with the content of the database.
  4. smartcall

    smartcall ISPConfig Developer


    the root setting for the website is /var/www

    the space:
    Filesystem Size Used Avail Use% Mounted on
    /dev/md0 23G 2.2G 20G 10% /
    tmpfs 1014M 0 1014M 0% /dev/shm
    /dev/md1 675G 355M 640G 1% /var

    The only reason I can think of is that I added a new field in isp_isp_web table in order to make it possible to switch between php4 and php5. I used the form editor to to so.
    And somehow this maybe confused the installer.

    The installation went as usual with no interruption.
    The very strange thing is the deletion of the /var/www after I emptied the recycle bin.
    Could and inconsistency in the database do that?
    All general settings are there and OK.

    So what I finally did was to delete all sites and some leftovers from the database due to its inconsistency. Now it looks like working server, but all sites are lost.


    Last edited: Jan 3, 2007
  5. falko

    falko Super Moderator

    That's the problem. The updater makes an SQL dump of the old database (with your new field), then it creates the structure of the new database and imports the SQL dump. Because of your new field the import process failed, and at least the isp_isp_web table is empty.
  6. smartcall

    smartcall ISPConfig Developer

    how to prevent?

    1. What would be the best solution to prevent this from happening in the future?
    For example, finding the database sructure in the new version and creating the field in the SQL of the new database structure?

    2. And still no ideas about the deleted /var/www?

    The wrong database dump is the reason for the empty table, but I'm already afraid to delete and empty the Recycle Bin.


  7. falko

    falko Super Moderator

    Do you have a backup of /var/www somewhere?
    To repair your ISPConfig, I suggest you restore the old version from the backups in the /tmp directory.
  8. smartcall

    smartcall ISPConfig Developer


    I repaired it by deleting all the sites and clients after it has deleted them all along with the parent www directory.
    But now I just want to know is it safe to use it. Once it deleted the whole directory, could I expect similar behaviour in the future?


  9. till

    till Super Moderator

    Thats not easy to predict. I have never seen this behaviour before and I know many ISPConfig installations :) I can not imagine how it could have happened if the document root is set correctly :confused:
  10. falko

    falko Super Moderator

    I think the problem was that the isp_isp_web table was empty after your update, and then you went into the ISPConfig web interface and made some changes there, so ISPConfig started to configure your system, and when it saw that there were no web sites in the isp_isp_web table, it removed the existing web sites in /var/www (this is part of the clean-up code in ISPConfig to free unused space).
  11. xrat

    xrat Member

    Are there plans to change this behavior? I am afraid I could forget this when the next update is due :eek:
  12. falko

    falko Super Moderator

    There's no such plan yet.
  13. smartcall

    smartcall ISPConfig Developer

    Isn't this strange? You created the Form Editor, but never planned an upgrade routine that would keep the edited forms.:confused:
  14. till

    till Super Moderator

    Not at all. The editor is intended for developers only to do changes that go into SVN / the enxt ISPConfig release. Have you ever tried to modify a serialized PHP object manually, then you know ehy there is an editor :)
  15. smartcall

    smartcall ISPConfig Developer


    OK. I get it!

    But I need a workaround.

    Would it be good enough to edit the sql file in the new version - the one to which I'm upgrading and add there the new field, which I added in the form editor?
    Also, edit all the files where I have made changes to the code - it's the file that makes the webs in Vhosts...conf.
    Then to start the setup script?

  16. till

    till Super Moderator

    I guess it should b enough if you add the missing field to the table create statement in the SQL dump of the ISPConfig installer and then replace the modified PHP files later when ISPConfig is installed.

Share This Page