Database error after install

Discussion in 'Installation & Upgrades' started by vapegoldcoast, May 24, 2016.

  1. vapegoldcoast

    vapegoldcoast New Member

    Hi guys.

    I just installed your CMS, set some of my settings up and am having an error writing to the database creating new pages and blocks.

    I can edit existing blocks and the businesscard template quite fine, but whenever I go to create a page or block, press save it comes back with "database error" at the top of the page.

    Just wondering if there is a common fix? Or is something wrong elsewhere?

    My friend currently runs Subrion with his site and has no problems at all. I get database error when I install from my home PC, as well as his PC at another location.

    Thanks in advance for your help.
  2. Vasily_B.

    Vasily_B. Project Manager

    Hi,

    Thanks for your interest in our software and welcome aboard.
    Probably there is an issue specific to your server configuration. Is it possible to get your FTP details via support ticket system? We would check the issue directly on your website and fix it for you.

    Thanks!
  3. benwalker4381

    benwalker4381 New Member

    Hi. The original poster above is my friend, I'm just trying to sort some things out with him now. It appears he hasn't got an FTP account setup with his new hosting, I can't access his cPanel due to a problem with his hosting company. Bear with us, we'll get some access there asap and setup an FTP account, that might fix the problem, if not, we'll put through a support ticket. Thank you
  4. Vasily_B.

    Vasily_B. Project Manager

    Ok, thanks for the feedback. Yes, no problem - ask if you have any questions.
  5. Andrew_G.

    Andrew_G. Staff Member

    Hi @vapegoldcoast ,

    Most likely the reason of DataBase error is in enabled MySQL Strict mode. In order to check it you need to:
    1) enable the debug mode by using this instruction: http://dev.subrion.org/projects/subrion-cms/wiki/DebugMode
    2) try to create block / page or something like that and look at debugger at the right bottom. If it contains error message like this:
    Code (Text):
    Field 'field_name' doesn't have a default value
    then you need to disable the MySQL Strict mode.

    Attached Files:

  6. benwalker4381

    benwalker4381 New Member

    Thanks for the replies. My friend has it sorted out now and is away with it all. Have a nice day.
    Vasily_B. likes this.
  7. Andrew_G.

    Andrew_G. Staff Member

    You're always welcome, @benwalker4381 .

    I'm glad to see that you don't have this issue anymore.
    benwalker4381 likes this.
  8. elias.soliman

    elias.soliman New Member

    Hi Andrew
    what can I do if I can't disable the MySQL Strict mode?
    I called the web hosting company, they told me that I have to upgrade my account to have control on this option.
    Is there other way to solve this problem?
  9. Vasily_B.

    Vasily_B. Project Manager

    Hi,

    In order to avoid STRICT mode issues (in case you cannot disable it on a server level), please add the following line in your includes/classes/ia.core.mysqli.php
    Code (Text):
    $this->query("SET @@sql_mode = '';");
    It should be added before this line:
    Code (Text):
    $this->query("SET NAMES 'utf8'");
    Please make sure your software uses MySQLi adapter. You can understand this by checking your includes/config.inc.php file. See INTELLI_CONNECT constant. It should be set to mysqli

    Let us know if the solution works for you. Thanks
    Andrew_G. and Dayir_A. like this.
  10. elias.soliman

    elias.soliman New Member

    you are the best. it's work amazing ;):D
  11. bez

    bez New Member

    Hi, I have installed the latest version - everything except for the database is working error message Red triangle with an explanation mark in and message Database error if i want to add events
  12. Dayir_A.

    Dayir_A. Staff Member

    Hello @bez,

    You have probably downloaded Events plugin from Subrion.org website (or from admin panel -> Extensions -> Plugins, it's the same)
    And the version of the Events plugin that is on subrion.org website unfortunately is obsolete. We'll release latest version soon.
    For now you can do these steps:
    Uninstall Events plugin
    Remove Events plugin's files from the server. It's located in /modules/events folder. You should remove the events folder
    Then download latest updated version from our repository: https://github.com/intelliants/subrion-plugin-events
    There is a Clone or download button
    Download ZIP version
    upload to server
    unzip
    rename folder to just events
    go to admin panel
    and install the plugin

    Thanks.
  13. bez

    bez New Member

    Thanks will give that a go.

Share This Page