<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Bug in Backups]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7228&amp;type=atom" />
	<updated>2018-01-04T22:50:57Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7228</id>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30406#p30406" />
			<content type="html"><![CDATA[<p><a href="https://github.com/FrontAccountingERP/FA/commit/c1f7794c267b3af334843af0bb025144287f8829">Committed</a> to stable repo.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-01-04T22:50:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30406#p30406</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30399#p30399" />
			<content type="html"><![CDATA[<p>@joe / @ itronics: can commit this.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-01-04T17:20:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30399#p30399</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30386#p30386" />
			<content type="html"><![CDATA[<p>thanks</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-01-03T22:21:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30386#p30386</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30378#p30378" />
			<content type="html"><![CDATA[<p>Yes, there is no file uploaded since the <strong>$_FILES</strong> is empty on upload. The <strong>$_REQUEST</strong> is like:<br /></p><div class="codebox"><pre><code>Array
(
    [comments] =&gt; 
    [comp] =&gt; no
    [protect] =&gt; 1
    [uploadfile] =&gt; frontac24_1_1_20171206_1551.sql
    [upload] =&gt; Upload file
    [_focus] =&gt; comments
    [_modified] =&gt; 0
    [_confirmed] =&gt; 
    [_token] =&gt; pZNU0jkQsPSi05HaQyLGAQxx
    [FA9d3e45269bea7dab23238a920d251e93] =&gt; 33ebcyesul0lgdnms17d8nna35
)</code></pre></div><p>The <strong>$_POST</strong> array does not have the last element above.</p><p>The fix is to make the <strong>start_form</strong> a multipart one - it was inadvertently changed during the <a href="https://github.com/FrontAccountingERP/FA/commit/a5edfc9244a2b1f478269a1b276cbf2236ec6cc3#diff-0ec760ac08d4d2533e4d40e89dfa87ce">last commit to this file</a>.<br />Change line 190 in <strong>admin/backups.php</strong><br /></p><div class="codebox"><pre><code>start_form(false, true);</code></pre></div><p>to be:<br /></p><div class="codebox"><pre><code>start_form(true, true);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-01-03T09:39:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30378#p30378</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30376#p30376" />
			<content type="html"><![CDATA[<p>yes, you can&#039;t restore a backup right now there is an error when trying to upload the backup file.<br />to restore my backup i had to upload it using ftp then i could restore.</p><p>so the bug shows up when trying to upload your backup file.</p>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2018-01-03T08:29:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30376#p30376</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30371#p30371" />
			<content type="html"><![CDATA[<p>No you are wrong, I am pressing upload button while selecting a .sql file to upload.</p><p>If I apply your suggestion, It only avoid error shown in post#1 but the file is still not uploaded.</p><p>You have to review the commit mentioned in post#1, Better give it a try to upload a .sql file to understand the bug.</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2018-01-03T03:05:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30371#p30371</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30340#p30340" />
			<content type="html"><![CDATA[<p>Since you have pressed the upload button without selecting any flie to upload, the error arises. Hence change line 169 in <strong>admin/backups.php</strong>:<br /></p><div class="codebox"><pre><code>if (get_post(&#039;upload&#039;))</code></pre></div><p>to be:<br /></p><div class="codebox"><pre><code>if (get_post(&#039;upload&#039;) &amp;&amp; isset($_FILES[&#039;uploadfile&#039;]) &amp;&amp; array_key_exists(&#039;tmp_name&#039;, $_FILES[&#039;uploadfile&#039;]))</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-12-31T13:35:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30340#p30340</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Bug in Backups]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=30325#p30325" />
			<content type="html"><![CDATA[<p>@itronics, I think yours <a href="https://github.com/FrontAccountingERP/FA/commit/a5edfc9244a2b1f478269a1b276cbf2236ec6cc3">commit</a> has created this <a href="https://prnt.sc/hufs6n">bug</a> in uploading a .sql backup file</p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2017-12-31T05:18:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=30325#p30325</id>
		</entry>
</feed>
