Field 'nginx_directives' doesn't have a default value

Discussion in 'ISPConfig 3 Priority Support' started by Turbanator, Aug 4, 2017.

  1. Turbanator

    Turbanator Member HowtoForge Supporter

    perfect jessie with apache2 multi server setup ISPC 3.1.6. Went to add a new website today and got this error:
    Field 'nginx_directives' doesn't have a default value
    The server is and always has run apache2.
    Could it be that another member of my team tried to install nginx at some point and caused an issue?
    Any help on fixing this error or determining if nginx is on the same box and removing it correctly would be helpful.
     
    Last edited: Aug 4, 2017
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This field exists always in the database, even on Apache systems. So I guess the problem is not that someone tried to install nginx. Do you get that error in the ISPConfig interface or when you use the remote api?
     
  3. Turbanator

    Turbanator Member HowtoForge Supporter

    This is within ISPC interface itself. As soon as I click save within Add New Website.
     

    Attached Files:

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Run this sql query in the dbispconfig database on that server, e.g. with phpmyadmin:

    Code:
    ALTERTABLE`web_domain`CHANGE`apache_directives``apache_directives`MEDIUMTEXTCHARACTERSETutf8COLLATEutf8_general_ciNULLDEFAULTNULL;
    and check if it solves the problem.
     
  5. Turbanator

    Turbanator Member HowtoForge Supporter

    mysql> ALTER TABLE `web_domain` CHANGE `apache_directives` `apache_directives` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
    Query OK, 0 rows affected (0.06 sec)
    Records: 0 Duplicates: 0 Warnings: 0

    Same error in ISPC.
     
  6. Turbanator

    Turbanator Member HowtoForge Supporter

    I took a cue from your code, and applied it to nginx_directives' in addition to apache_directives and it worked!
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, of course. It had to be applied to the nginx_directives field and not the apache one. Sorry for the wrong sql.
     

Share This Page