<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — I try to install new copy of FA2.3.25, there is a bug!]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6264&amp;type=atom" />
	<updated>2016-05-17T20:18:28Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6264</id>
		<entry>
			<title type="html"><![CDATA[Re: I try to install new copy of FA2.3.25, there is a bug!]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25525#p25525" />
			<content type="html"><![CDATA[<p>Disable Strict Mode in MySQL 5.7 and beyond:</p><p>https://support.kayako.com/article/472-how-do-i-disable-mysql-strict-mode-on-the-server<br />https://mattstauffer.co/blog/how-to-disable-mysql-strict-mode-on-laravel-forge-ubuntu</p><div class="quotebox"><blockquote><p>MySQL actually looks five different places for configuration files, so you can make the change I&#039;m about to recommend several places. It&#039;ll look in </p><p>/etc/my.cnf, <br />/etc/mysql/my.cnf, <br />SYSCONFDIR/my.cnf, <br />$MYSQL_HOME/my.cnf, and <br />~/my.cnf. </p><p>The last one above is user-specific, and the third and fourth options rely on specifics from your environment.</p></blockquote></div><p>In the <strong>my.cnf</strong> file, use the following:<br /></p><div class="codebox"><pre><code>[mysqld]
sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION</code></pre></div><p>Then restart MySQL - in Debian / Ubuntu it is:<br /></p><div class="codebox"><pre><code>/etc/init.d/mysql restart</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2016-05-17T20:18:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25525#p25525</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: I try to install new copy of FA2.3.25, there is a bug!]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25501#p25501" />
			<content type="html"><![CDATA[<p>When posting information on an error you should post the choices made in the preceeding form. Assuming you chose the en_US-new.sql Chart of Accounts in the previous form, line 42 in <strong>sql/en_US-new.sql</strong> is:<br /></p><div class="codebox"><pre><code>  `tran_date` date NOT NULL default &#039;0000-00-00&#039;,</code></pre></div><p>Some recent versions of MySQL do not allow &#039;0000-00-00&#039; as a valid date field value. Try removing all such constructs (<strong>default &#039;0000-00-00&#039;</strong>) from the said sql file and re-try the installation after emptying the db. Alternatively <em>set strict mode off</em> in MySQL.</p><p>The following links provide further info:<br />https://dev.mysql.com/doc/refman/5.6/en/datetime.html<br />http://stackoverflow.com/questions/25349126/how-can-i-set-the-default-value-of-a-field-as-0000-00-00-000000<br />http://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime<br /></p><div class="quotebox"><blockquote><p>The error is because of the sql mode which can be <strong>strict mode</strong> as per latest MYSQL 5.7 documentation</p><p>MySQL Documentation 5.7 says:</p><p>&nbsp; &nbsp; Strict mode affects whether the server permits &#039;0000-00-00&#039; as a valid date: If strict mode is not enabled, &#039;0000-00-00&#039; is permitted and inserts produce no warning. If strict mode is enabled, &#039;0000-00-00&#039; is not permitted and inserts produce an error, unless IGNORE is given as well. For INSERT IGNORE and UPDATE IGNORE, &#039;0000-00-00&#039; is permitted and inserts produce a warning.</p><p><strong>To Check MYSQL mode</strong></p><p>SELECT @@GLOBAL.sql_mode global, @@SESSION.sql_mode session</p></blockquote></div><p>There are a total of 31 places in the <strong>en_US-new.sql</strong> file where the said construct is there.</p><p>There are many places in the php codebase where the equivalent of the following constructs are available:<br /></p><div class="codebox"><pre><code>if ($date == 0) $date = &#039;0000-00-00&#039;;</code></pre></div><p>and<br /></p><div class="codebox"><pre><code>        $sql .= &quot; tran_date &gt; IF(ctype&gt;0 AND ctype&lt;&quot;.CL_INCOME.&quot;, &#039;0000-00-00&#039;, &#039;$from_date&#039;) AND&quot;;</code></pre></div><p>Hence it is better to turn the <em>strict mode off</em> in the mysql and not tamper with the Charts sql.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2016-05-16T05:12:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25501#p25501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[I try to install new copy of FA2.3.25, there is a bug!]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25497#p25497" />
			<content type="html"><![CDATA[<p>I try to install new copy of FrontAccounting 2.3.25 in local server WAMP 3.0<br />but there is an error and stop installing on step 5.</p><p>It shows it:</p><p>SQL script execution failed in line 42: Invalid default value for &#039;tran_date&#039;</p>]]></content>
			<author>
				<name><![CDATA[aRTx]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19752</uri>
			</author>
			<updated>2016-05-15T08:34:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25497#p25497</id>
		</entry>
</feed>
