42go to ISPconfig

Discussion in 'General' started by Jorem, Jan 15, 2007.

  1. Jorem

    Jorem Member

    Is there a way to go from 42go to ISPconfig?

    I have a new server and would like to install 42go on it. But then I can only install CentOS 4.2 on it. ISPconfig also works with 4.4. The support on the forum is better. More updates with extra features. That are the main reasons why I became a member here.

    Now ISPconfig also has the remoting function, so I don't see why I have to stay with 42go. Now is my question: How can I go from 42go to ISPconfig?

    Thanks for your help.
     
  2. Hans

    Hans Moderator Moderator

    Performing an update from 42go to ISPConfig is not possible.
     
  3. Jorem

    Jorem Member

    I know that an update is not possible.

    But when I install ISPconfig on the new server. Is there a way to update the database with the data from my 42go database?

    If I can do that I am halfway there I think. I maybe have to change some setting in the database to the new install (42go path to ispconfig path)?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try the following solution:

    1) Install ISPConfig on the new server.
    2) Export the data from your 42go installation, except of the tables isp_server, isp_server_ip and doctype. The exported data must consis of full insert staements.
    3) Make a backup of your ISPConfig database, then empty all tables except of the tables isp_server, isp_server_ip and doctype.
    4) Import the data from (2) into the almost empty ISPConfig database.
    5) Move the data from your document root, and the system users to the new server as described in several posts that you will find when you search for "move ispconfig" in the forum.

    I've not tested it, but I guess it will work.
     
  5. Jorem

    Jorem Member

    Thanks Till. I will give it a try tomorrow.
     
  6. Jorem

    Jorem Member

    I did the steps you discribed but i have an error now.

    When I look at an account eveything looks OK. But when I click on one of the tabs like users and email or options I get an error. It sais: missing web_traffic_ueberschreitung

    I looked it up in de sql file and found that it is missing in 42go when i compare it to the sql from ispconfig. it is a row in isp_isp_web. When I add this line I get a error when I try to load the sql into the database in phpmyadmin.

    This are the lines that are missing in the 42go sql compared to the ispconfig:
    `web_traffic_ueberschreitung` varchar(255) default NULL,
    `web_traffic_status` varchar(255) default NULL,
    `webalizer_stats` char(1) default '1',

    What do have to change to make it work properly. I think I am almost there : ).

    Thanks for your help.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    It looks like you used the database layout from 42go instead the layout from ISPConfig. You must import the data from your old database ad not the table definitions.

    The tables must be emptied and not deleted. Please follow exactly the steps I outlined above. and do not delete any database table in the ISPConfig database, delete only the data in the tables.
     
  8. Jorem

    Jorem Member

    When I do the steps I get this error now:

    INSERT INTO isp_isp_reseller
    VALUES ( 1, 1022 therestofthedata

    Error:
    #1136 - Column count doesn't match value count at row 1

    What does this mean?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats why you must use full insert statements that contain the field names too and not only the data, as I posted above.

     
  10. Jorem

    Jorem Member

    Sorry Till, I don't understand what you mean with full insert statement. I have the data exported and it looks like this in the sql file.

    INSERT INTO `dns_a` VALUES (176, 1018, 'localhost', '127.0.0.1');

    In phpMyAdmin I have it exported as INSERT. Without the structure.

    Is there an export setting that I missed? Can I select Full insert statement somewhere?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    You missed to enable the checkbox in phpmyadmin to export full insert statements and not just the data without the column names.
     
  12. Jorem

    Jorem Member

    It worked :).

    I only had to change a few lines in isp_isp_reseller . The last 3 options about mail couldn't be null so I changed them to 1.

    No eveything went smooth and am I testing the box.

    Thanks for you help Till.
     
  13. Craig

    Craig New Member

    Although you already got it working, here's a little bit about Full inserts.

    There are *two* ways to insert data into a table, the first and more compact, makes an assumption about the table layout and the fields it contains. For example, if you have a table "table_1" with the following fields defined and in this order:

    field_1 field_2 field_3

    and then execute an insert such as:

    "INSERT INTO table_1 VALUES(123, 456, 789)"

    It will then insert "123" into "field_1", "456" into "field_2" and "789" into "field_3"

    It does that because it assumes the three sets of data go into the three available fields. It also requires, for this type of insert, that the number of data elements is the same as the number of fields in the table and that the order of the data matches the order of the fields.

    But, if you try an insert, on the same table, like this :

    "INSERT INTO table_1 VALUES(123, 789)"

    It will puke on you because the number of fields and data submitted don't match so it doesn't know what to do with what.

    On the other hand a "Full insert" takes all the ambiguity out leaving no need for assumptions. A full insert of the same data would look like this :

    "INSERT INTO table_1 (field_1, field_2, field_3) VALUES (123, 456, 789)"

    That way, the SQL server knows exactly what goes with what so you could even do something like this :

    "INSERT INTO table_1 (field_1, field_3) VALUES (123, 789)"

    So, it seems that 42go has similar but not exactly the same fields as ISPConfig although the ones they share are named the same and using the same data types and to insert data from 42go into ISPConfig with them having some of the same fields and some different, you need to tell the SQL server exactly what data is going into what fields, hence "Full insert".

    [EDIT] Regarding the *two*, there are actually a bajillion ways to insert data, these are just the two most appropo for this discussion. ;) [/EDIT]
     

Share This Page