<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — PDF window not working]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5919&amp;type=atom" />
	<updated>2015-09-05T06:57:38Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5919</id>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24203#p24203" />
			<content type="html"><![CDATA[<p>The expression <strong>version_compare(PHP_VERSION, &quot;5.3.0&quot;)</strong> does indeed return <strong>-1 or false</strong>, but the interpreter / parser fails if the script has the <strong>preg_replace_callback function</strong> which does not exist in <strong>PHP 5.2.17</strong>. Hence the <strong>include_once</strong> workaround suggested.</p><p>Wonder how MySQL 5.5 and PHP 5.2.17 got together in bluehost server!</p><p>Here is a list of server details for simulation:<br /></p><div class="codebox"><pre><code># uname -a
Linux box1243.bluehost.com 3.12.35.1418868052 #1 SMP Wed Dec 17 20:04:02 CST 2014 x86_64 x86_64 x86_64 GNU/Linux

# php -m | grep -i &quot;mbstring&quot;
mbstring

# yum update
CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf

# php -v
PHP 5.2.17 (cgi-fcgi) (built: Oct  2 2013 09:23:52)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

# mysql --version
mysql  Ver 14.14 Distrib 5.5.42-37.1, for Linux (x86_64) using readline 5.1</code></pre></div><p>It appears that most hosting providers like <strong>justhost.com</strong> and <strong>hostmonster.com</strong> too use the same kernel <strong>initramfs-3.12.35.1418868052.img</strong> and the files can be seen <a href="http://iilsa.com/iiltest/unzip.php?dir=/lib/modules/3.12.35.1418868052">here</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-09-05T06:57:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24203#p24203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24202#p24202" />
			<content type="html"><![CDATA[<p>@apmuthu.</p><p>This is strange. The expression <strong>version_compare(PHP_VERSION, &quot;5.3.0&quot;)</strong> should return -1 if the PHP_VERSION is 5.2.17.</p><p>Therefore is should only enter the preg_replace_callback function if the PHP_VERSION was 5.3.0 or higher.</p><p>I have no idea why. But we could make it safe by adding the function_exists on the line too, f.i.</p><p><strong>if (version_compare(PHP_VERSION, &quot;5.3.0&quot;) &gt;= 0 &amp;&amp; function_exists(&quot;preg_replace_callback&quot;))</strong></p><p>For your information the preg_replace with the /e option is deprecated from PHP version 5.3.0.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-09-04T21:11:00Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24202#p24202</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24194#p24194" />
			<content type="html"><![CDATA[<p>@gwidlgoose: Actually solving this issue helped us understand how to implement deprecated functions replacements better. Your trust in placing your server in our hands is valued. Change credentials forthwith.</p><p>@joe: Need to implement the &quot;include_once&quot; of a separate file for the PHP 5.3+ code in <strong>reporting/includes/html_entity_decode_php4.php</strong></p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-09-04T20:00:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24194#p24194</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24193#p24193" />
			<content type="html"><![CDATA[<p>APMUTHU - what can I say? Thank you doesn&#039;t seem to capture my gratitude.&nbsp; And although I say amputhu, I mean all of you who have helped me with this. This is truly and awesome community.</p>]]></content>
			<author>
				<name><![CDATA[gwildgoose]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20655</uri>
			</author>
			<updated>2015-09-04T19:42:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24193#p24193</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24192#p24192" />
			<content type="html"><![CDATA[<p>It <strong><span style="color: blue">now works</span></strong> after the following commit by Joe on 2014-11-07 was reverted for PHP v5.2.17 prevalent in your BlueHost server:<br /><a href="http://https:/sourceforge.net/p/frontaccounting/git/ci/a1a4dfb6ba6bc8104bf29cc02858c2e2eab1abfb/">Fixed deprecated preg_replace in php &gt;= 5.3.0 with the /e flag in utf8 reports.</a></p><p>Although the <strong>if (version_compare(PHP_VERSION, &#039;5.3.0&#039;) &gt;= 0)</strong> works as expected, the code in the file refers to the <strong>function preg_replace_callback()</strong> which does not exist in PHP v5.2.17 and the interpreter fails - hence the reversion in this instance.</p><p>It is best that the PHP v5.3 bit of code is kept in another file and included inside it&#039;s place in the &quot;<strong>if</strong>&quot; construct here.</p><p>This issue has been <strong><a href="https://frontaccounting.com/fawiki/index.php?n=Help.ReportsAndAnalysis">wiki</a>ed</strong>.</p><p>Had to upload the missing fonts (<a href="https://frontaccounting.com/wbt/modules/download_gallery/dlc.php?file=57">dejavu</a> and FreeSans) into the <strong>reporting/fonts</strong> folder as they are not part of the FA download.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-09-04T18:44:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24192#p24192</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24190#p24190" />
			<content type="html"><![CDATA[<p>This has to do with &quot;SHTML Wrapper - 500 Server Error&quot; on the bluehost box you are on. They decided to change security permissions to prevent the execution of any file with permissions &gt; 644 and folders &gt; 744.</p><p>See this <a href="http://www.bluehostforum.com/showthread.php?11101-SHTML-Wrapper-500-Server-Error-moving-to-a-new-box-helps&amp;s=dc3af509621dbd3cff2b29fe3922885d&amp;p=58264#post58264">bluehost forum post</a>.</p><p>Working on it.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-09-04T17:38:33Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24190#p24190</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24188#p24188" />
			<content type="html"><![CDATA[<p>This is a new install, so each time I reinstalled the DB were completely erased, and although I tried the Beta version of 2.4 I did not import any files because there were no files to import. <br />I have attempted to attach a screen shot but I do not see an option for that in these forums.<br />I really appreciate all the help you guys are offering.</p>]]></content>
			<author>
				<name><![CDATA[gwildgoose]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20655</uri>
			</author>
			<updated>2015-09-04T11:45:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24188#p24188</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24183#p24183" />
			<content type="html"><![CDATA[<p>Still I don&#039;t think it&#039;s script or code error. </p><p>Can you send us a screenshot after showing the progress bar when you click on the submit button. </p><p>And also make sure before taking screenshot&nbsp; your chrome developer tools must be enabled. </p><p>And for the developer tools press f12 <br />Than take a screenshot&nbsp; and attach here.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2015-09-03T23:54:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24183#p24183</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24182#p24182" />
			<content type="html"><![CDATA[<p>OK. I figured that the script either fails to read some library/font etc. or it can&#039;t write the pdf data to disk. File permissions would have explained those.</p><p>What else could cause it to fail? Faulty code or faulty data. Unless you&#039;ve messed with the code, I would look at the data. Does it get read as it should? Is it in the expected format (encoding)? Did you by any chance import the data from a previous install? Like, say, the 2.4 beta? The one which is supposed to be strictly UTF?</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2015-09-03T22:18:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24182#p24182</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24181#p24181" />
			<content type="html"><![CDATA[<p>Yes the web server user owns the directory. I temporarily set the file permissions to 755 for all except config.php and config_db.php which are set to 444.</p>]]></content>
			<author>
				<name><![CDATA[gwildgoose]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20655</uri>
			</author>
			<updated>2015-09-03T20:03:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24181#p24181</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24180#p24180" />
			<content type="html"><![CDATA[<p>I suspect a permissions problem. Does the web server user own the directory you installed FA into?</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2015-09-03T19:46:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24180#p24180</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24179#p24179" />
			<content type="html"><![CDATA[<p>First off I want to say thank you for all your help. I do not believe it is a matter of my browser, I have tried 4 separate browsers on 3 different computers from 3 different unique IP addresses all with the same results.</p>]]></content>
			<author>
				<name><![CDATA[gwildgoose]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20655</uri>
			</author>
			<updated>2015-09-03T19:26:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24179#p24179</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24176#p24176" />
			<content type="html"><![CDATA[<p>Can try <a href="http://www.sumatrapdfreader.org/free-pdf-reader.html">SumatraPDF</a><br />FA still works with some very old Adobe Acrobat reader plugins.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-09-03T03:44:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24176#p24176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24175#p24175" />
			<content type="html"><![CDATA[<p>I guess its a&nbsp; problem with your pdf plugin.&nbsp; On your Adobe reader has a plugin which will install on all the browser&#039;s to see the pdf with in the browser itself.&nbsp; So try install upgraded version of Adobe reader and if it asks you to install a plugin on browser just allow it. <br />I feel like you have the problem with&nbsp; your Adobe reader. </p><p>Check it and ping me back.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2015-09-03T00:12:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24175#p24175</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PDF window not working]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24173#p24173" />
			<content type="html"><![CDATA[<p>PM me the details</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-09-02T21:01:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24173#p24173</id>
		</entry>
</feed>
