<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Error Adding New Item or Editing Existing Item]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=4843&amp;type=atom" />
	<updated>2014-04-05T02:41:48Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=4843</id>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19646#p19646" />
			<content type="html"><![CDATA[<p>Try to rollback to a version before PHP 5.5.x and revert with the results.<br />Hope you are using MySQL_PDO or MySQLi instead of MySQL driver, else try with the MySQLi driver even without changing the PHP version.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-04-05T02:41:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19646#p19646</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19640#p19640" />
			<content type="html"><![CDATA[<p>PHP = 5.3.27<br />MySQL = 5.6.14 Community<br />OS = Windows Server 2012 R2 x64</p><p>It has all worked fine in the past, this just started happening and I can&#039;t think of anything that has changed.</p>]]></content>
			<author>
				<name><![CDATA[crspencer@sol-tech.co]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18469</uri>
			</author>
			<updated>2014-04-04T17:23:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19640#p19640</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19637#p19637" />
			<content type="html"><![CDATA[<p>@joe: Thankyou Joe, when codeing it, I was thinking only of the function arguments and not the order...</p><p>@crspencer: Yes, it will now have to be your versions of PHP/MySQL or their implementation in the Server OS used. Ref: <a href="https://dev.mysql.com/doc/apis-php/en/apis-php-function.mysql-fetch-array.html">MySQL v5.5.13 Deprecated use</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-04-04T04:19:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19637#p19637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19635#p19635" />
			<content type="html"><![CDATA[<p>Which versions are you running? MySql, PHP and OS.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2014-04-03T20:10:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19635#p19635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19633#p19633" />
			<content type="html"><![CDATA[<p>After completing that fix, I still get the red triangle but no longer get error messages in the log.&nbsp; When I try and change an existing item, I get the red triangle and this in the error log:</p><p>[03-Apr-2014 12:55:27 America/New_York] 1:crspencer:connect_db.inc:89: mysql_fetch_array() expects parameter 1 to be resource, boolean given<br />[03-Apr-2014 12:55:27 America/New_York] 1:crspencer:connect_db.inc:89: mysql_fetch_array() expects parameter 1 to be resource, boolean given<br />[03-Apr-2014 12:56:02 America/New_York] 1:crspencer:connect_db.inc:89: mysql_fetch_array() expects parameter 1 to be resource, boolean given<br />[03-Apr-2014 12:56:02 America/New_York] 1:crspencer:connect_db.inc:89: mysql_fetch_array() expects parameter 1 to be resource, boolean given</p>]]></content>
			<author>
				<name><![CDATA[crspencer@sol-tech.co]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18469</uri>
			</author>
			<updated>2014-04-03T17:01:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19633#p19633</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19632#p19632" />
			<content type="html"><![CDATA[<p>@apmuthu</p><p>Your solution didn&#039;t accept jpg files in my environment.</p><p>The elsif sentence was originally badly written. <br /></p><div class="codebox"><pre><code>Your solution has been changed from 

elseif (@strtoupper(substr(trim($_FILES[&#039;pic&#039;][&#039;name&#039;]), @in_array(strlen($_FILES[&#039;pic&#039;][&#039;name&#039;]) - 3, array(&#039;JPG&#039;,&#039;PNG&#039;,&#039;GIF&#039;)))))
     
to a much more reliable sentence

elseif (!in_array(strtoupper(substr(trim($_FILES[&#039;pic&#039;][&#039;name&#039;]), strlen($_FILES[&#039;pic&#039;][&#039;name&#039;]) - 3)), array(&#039;JPG&#039;,&#039;PNG&#039;,&#039;GIF&#039;)))</code></pre></div><p>Please download the file items.php1. Rename it to items.php and replace it in /inventory/manage folder.</p><p>HG repository willbe updated in a while.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2014-04-03T14:32:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19632#p19632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19631#p19631" />
			<content type="html"><![CDATA[<p>Nice catch.</p><p>Replace the file <strong>inventory/manage/items.php</strong> with the file in the attachment in this post.</p><p>Joe - please fix it in the Hg repo - attachment has the patch as well.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-04-03T12:40:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19631#p19631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Error Adding New Item or Editing Existing Item]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=19623#p19623" />
			<content type="html"><![CDATA[<p>When I try and add a new item or edit an existing item all I get is a red triangle at the top of the form.&nbsp; In the error log I get the following entries:</p><p>[02-Apr-2014 20:48:16 America/New_York] 1:crspencer:items.php:78: in_array() expects at least 2 parameters, 1 given<br />[02-Apr-2014 20:48:16 America/New_York] 1:crspencer:items.php:78: strtoupper() expects exactly 1 parameter, 2 given</p><br /><p>Any help would be much appreciated!!</p>]]></content>
			<author>
				<name><![CDATA[crspencer@sol-tech.co]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18469</uri>
			</author>
			<updated>2014-04-03T01:00:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=19623#p19623</id>
		</entry>
</feed>
