<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Missing files errors in /tmp/errors.log and fix]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7127&amp;type=atom" />
	<updated>2017-11-17T14:37:27Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7127</id>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29639#p29639" />
			<content type="html"><![CDATA[<p>@joe / @itronics:</p><p>From the PHP Manual Comments:<br /></p><div class="quotebox"><blockquote><p>Using the &#039;set_exception_handler&#039; function within a class, the defined &#039;exception_handler&#039; method must be declared as &#039;public&#039; (preferrable &#039;public static&#039; if you use the &quot;array(&#039;example&#039;, &#039;exception_handler&#039;)&quot; syntax). It should be in an array as below:</p><div class="codebox"><pre><code>&lt;?php
class example {
    public function __construct() {
        @set_exception_handler(array(&#039;example&#039;, &#039;exception_handler&#039;));
        throw new Exception(&#039;DOH!!&#039;);
    }

    public static function exception_handler($exception) {
        print &quot;Exception Caught: &quot;. $exception-&gt;getMessage() .&quot;\n&quot;;
    }
}

$example = new example;

echo &quot;Not Executed\n&quot;;
?&gt;</code></pre></div><p>Declaring the &#039;exception_handler&#039; function as &#039;private&#039; causes a FATAL ERROR.</p></blockquote></div><p>Looks like every instance of <a href="https://stackoverflow.com/questions/11176815/set-exception-handler-in-codeigniter-how-to-use">exception handling within a class</a> should be so coded for PHP 5.6 / 7.1.</p><p>Place the 3 files one by one and see which one is faulty.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-17T14:37:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29639#p29639</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29637#p29637" />
			<content type="html"><![CDATA[<p>5.6 on server &quot;where the bug occurs&quot;<br />7.1 localhost</p>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2017-11-17T14:07:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29637#p29637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29636#p29636" />
			<content type="html"><![CDATA[<p>@alaa</p><p>What are the php versions?</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-11-17T13:55:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29636#p29636</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29635#p29635" />
			<content type="html"><![CDATA[<p>this doesnt happen when i use the new files on my localhost but it happens on the online server.</p>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2017-11-17T13:22:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29635#p29635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29634#p29634" />
			<content type="html"><![CDATA[<p>i can confirm now that the files mentioned above caused 2 problems. </p><p>1- the error message mentioned above.<br />2- when generating excel report the file is corrupted.</p><p>the problem is fixed by replacing the new files with the old files.</p>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2017-11-17T13:04:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29634#p29634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29633#p29633" />
			<content type="html"><![CDATA[<p>i just replaced the files with the ones from the last build.</p><p>includes/current_user.inc<br />includes/hooks.inc<br />includes/session.inc</p>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2017-11-17T12:25:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29633#p29633</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29632#p29632" />
			<content type="html"><![CDATA[<p>I am unable to simulate your error. Please state what steps were necessary to trigger it. Make sure your tmp folder is writeable by your webserver process.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-17T12:22:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29632#p29632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29627#p29627" />
			<content type="html"><![CDATA[<p>Hello ,,, </p><p>seems this fix caused an error message to appear.<br />after updating all the 3 files included in the fix <br />includes/current_user.inc<br />includes/hooks.inc<br />includes/session.inc</p><p>i started to get this error<br /></p><div class="codebox"><pre><code>set_exception_handler() expects the argument (exception_handler) to be a valid callback in file: ...includes/session.inc at line 375</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alaa]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20274</uri>
			</author>
			<updated>2017-11-17T08:01:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29627#p29627</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29614#p29614" />
			<content type="html"><![CDATA[<p>@joe: <a href="https://github.com/FrontAccountingERP/FA/commit/e3fd06a0ed3b614793403b8099f842e0238b616c">Committed</a></p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-16T14:28:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29614#p29614</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Missing files errors in /tmp/errors.log and fix]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29587#p29587" />
			<content type="html"><![CDATA[<p>Reported in the Mantis BugTracker as issue <a href="http://mantis.frontaccounting.com/view.php?id=4082">#4082</a>.</p><p>On a fresh install of FA 2.4.3 on WinXPSP3/XAMPP 1.73/PHP 5.3.1, we find that the &quot;@&quot; prefixing some function calls do not supress errors in the FA <strong>/tmp/errors.log</strong>. Here are a few errors that arose:</p><div class="codebox"><pre><code>session.inc:440:[before upgrade] include_once(./tmp/faillog.php) [&lt;a href=&#039;function.include-once&#039;&gt;function.include-once&lt;/a&gt;]: failed to open stream: No such file or directory
session.inc:440:[before upgrade] include_once() [&lt;a href=&#039;function.include&#039;&gt;function.include&lt;/a&gt;]: Failed opening &#039;./tmp/faillog.php&#039; for inclusion (include_path=&#039;.;\XAMPP\php\PEAR&#039;)
session.inc:490:[before upgrade] include(./company/0/installed_extensions.php) [&lt;a href=&#039;function.include&#039;&gt;function.include&lt;/a&gt;]: failed to open stream: No such file or directory
session.inc:490:[before upgrade] include() [&lt;a href=&#039;function.include&#039;&gt;function.include&lt;/a&gt;]: Failed opening &#039;./company/0/installed_extensions.php&#039; for inclusion (include_path=&#039;.;\XAMPP\php\PEAR)
hooks.inc:238:[before upgrade] Invalid argument supplied for foreach()
current_user.inc:735:[before upgrade] opendir(./company/0/js_cache/0) [&lt;a href=&#039;function.opendir&#039;&gt;function.opendir&lt;/a&gt;]: failed to open dir: No such file or directory
session.inc:440:[before upgrade] include_once(./tmp/faillog.php) [&lt;a href=&#039;function.include-once&#039;&gt;function.include-once&lt;/a&gt;]: failed to open stream: No such file or directory
session.inc:440:[before upgrade] include_once() [&lt;a href=&#039;function.include&#039;&gt;function.include&lt;/a&gt;]: Failed opening &#039;./tmp/faillog.php&#039; for inclusion (include_path=&#039;.;\XAMPP\php\PEAR&#039;)</code></pre></div><p>Each time we logout of FA, the following gets logged (date/time prefix removed) in the FA <strong>/tmp/errors.log</strong>:</p><div class="codebox"><pre><code>logout.php:50:[before upgrade] session_destroy() [&lt;a href=&#039;function.session-destroy&#039;&gt;function.session-destroy&lt;/a&gt;]: Session object destruction failed</code></pre></div><p>These entries are the result of failure to respect the &quot;@&quot; prefixing the <strong>session_destroy()</strong> function used therein. Such entries, however, can be leveraged by any log parsing program to monitor logout events.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-11-14T02:41:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29587#p29587</id>
		</entry>
</feed>
