<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Can't install extension]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=4480&amp;type=atom" />
	<updated>2015-04-13T07:13:21Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=4480</id>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23251#p23251" />
			<content type="html"><![CDATA[<p>644 is a subset of 666 - check if the ownerships changed.</p><p>@joe: should we introduce the leading &quot;\0&quot; stripping out in the core? Will it affect any End of Field character for VARCHARS for buffer overflow exploits?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-04-13T07:13:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23251#p23251</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23244#p23244" />
			<content type="html"><![CDATA[<p>I had same problem.&nbsp; /account/modules/import_multijournalentries/import_multijournalentries.php could not open and gave error.</p><p>When I checked the permissions is was art 666. When I cahnged it to 644 it works fine now.</p>]]></content>
			<author>
				<name><![CDATA[seahawk]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=544</uri>
			</author>
			<updated>2015-04-12T20:15:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23244#p23244</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18308#p18308" />
			<content type="html"><![CDATA[<p>It may be simpler to remove the &quot;\0&quot; in the filenames or use an appropriate option in the extraction program used.</p><p>All extension files in extracted form are available at <a href="https://github.com/apmuthu/frontaccounting/tree/master/extensions"><strong>my github repo</strong></a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-11-03T03:28:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18308#p18308</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18254#p18254" />
			<content type="html"><![CDATA[<p>@apmuthu: All the files had null characters in them. I think it must have something with the setup that I have. I used archlinux so the packages tend to be ahead of most distributions. I&#039;m using php 5.5.5, apache 2.2.25, and curl 7.32.0.</p><p>I added the following line to the function extract_files in archive.inc, right after file is set using fields from temp</p><div class="codebox"><pre><code>$file[&#039;name&#039;] = str_replace(&quot;\0&quot;, &quot;&quot;, $file[&#039;name&#039;]);</code></pre></div><p>I figured out how to use the extension after it was installed. I think I was just getting tired after debugging, and didn&#039;t activate it for the company.</p><p>Thanks for everyone&#039;s help.</p>]]></content>
			<author>
				<name><![CDATA[kfrance]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18664</uri>
			</author>
			<updated>2013-10-28T15:01:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18254#p18254</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18245#p18245" />
			<content type="html"><![CDATA[<p>The said extension&#039;s files are available at:<br />https://github.com/apmuthu/frontaccounting/tree/master/extensions/Extensions/import_multijournalentries</p><p><strong>@kfrance</strong>: Please notify which files had the null characters in their names.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-10-28T10:12:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18245#p18245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18224#p18224" />
			<content type="html"><![CDATA[<p>I have no idea now how I actually installed it, but I do remember it didn&#039;t feel very straightforward...</p><p>Looking at the &quot;Install/Activate extensions&quot; page, there is a dropdown at the top. If you select &quot;Activated for &lt;company&gt;&quot;, you should be able to activate the extensions you have installed.</p><p>Once you do, I would expect it to be available in the access setup.</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2013-10-26T10:18:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18224#p18224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18221#p18221" />
			<content type="html"><![CDATA[<p>I got the extension to install, I just had to strip the null characters from the file names as they were being extracted. For some reason there was a good amount of padding of null characters on both sides of the file name.</p><p>The problem is now that it is installed, says it is installed, I can&#039;t seem to use it. Nothing appears in the banking and general ledger page and it isn&#039;t listed on the access setup page. I&#039;m using just the admin account right now. Any ideas how to debug this?</p>]]></content>
			<author>
				<name><![CDATA[kfrance]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18664</uri>
			</author>
			<updated>2013-10-26T02:21:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18221#p18221</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18220#p18220" />
			<content type="html"><![CDATA[<p>I&#039;m not running in safe mode (don&#039;t think I can since I&#039;m using php 5.5.5), and I&#039;m within the document root of the server which is included in the open_basedir list.</p>]]></content>
			<author>
				<name><![CDATA[kfrance]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18664</uri>
			</author>
			<updated>2013-10-25T19:53:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18220#p18220</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18219#p18219" />
			<content type="html"><![CDATA[<p>You were thinking along the lines that I am.</p><p>The current directory using getcwd is /srv/http/frontaccounting/modules/_cache/import_multijournalentries-2.3.0-4. Which seems right to me.</p><p>I also checked the encoding of the string and is is ASCII according to mb_detect_encoding. I checked this because of the results on this website (http://www.opencore.eesc.usp.br/patricia/phpsource/php-5.5.3/ext/standard/tests/file/is_dir_variation4.phpt) which shows the same errors I&#039;m getting when testing binary safe strings.</p><p>I also set the import_multijournalentries-2.3.0-4 permissions to 777, just in case there was a permissions problems.</p>]]></content>
			<author>
				<name><![CDATA[kfrance]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18664</uri>
			</author>
			<updated>2013-10-25T19:41:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18219#p18219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18218#p18218" />
			<content type="html"><![CDATA[<p>http://www.php.net/manual/en/function.is-dir.php says &quot;If you have enabled safe mode, or open_basedir further restrictions may apply.&quot; </p><p>Could this be one of those restrictions?</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2013-10-25T19:34:53Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18218#p18218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18217#p18217" />
			<content type="html"><![CDATA[<p>I was wondering if there could be a problem with the path. Just what is the script&#039;s current directory when it tries to create &quot;_init&quot;? </p> <br /><p>http://www.php.net/manual/en/function.is-dir.php <br />http://php.net/manual/en/function.mkdir.php</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2013-10-25T19:24:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18217#p18217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18215#p18215" />
			<content type="html"><![CDATA[<p>Thanks for your help and suggestions.</p><p>I don&#039;t think it is permissions. My server runs as user &quot;http&quot;. The modules folder has 777 permissions, as does the _cache directory. import_multijournalentries-2.3.0-4.pkg has 644 permissions and is owned by http. The created folder import_multijournalentries-2.3.0-4 is owned by http and has write permissions.</p><p>I&#039;ve increased the debugging output so you can see the parameters being passed to is_dir. </p><div class="codebox"><pre><code>is_dir() expects parameter 1 to be a valid path, string given in file: /srv/http/frontaccounting/includes/archive.inc at line 381
/srv/http/frontaccounting/includes/archive.inc:381:     is_dir(&#039;_init&#039;)
/srv/http/frontaccounting/includes/packages.inc:54:     (tar_file Object)-&gt;extract_files()
/srv/http/frontaccounting/includes/packages.inc:654:     (package Object)-&gt;install()
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension(&#039;import_multijournalentries&#039;)
mkdir() expects parameter 1 to be a valid path, string given in file: /srv/http/frontaccounting/includes/archive.inc at line 382
/srv/http/frontaccounting/includes/archive.inc:382:     mkdir(&#039;_init&#039;,&#039;16877&#039;)
/srv/http/frontaccounting/includes/packages.inc:54:     (tar_file Object)-&gt;extract_files()
/srv/http/frontaccounting/includes/packages.inc:654:     (package Object)-&gt;install()
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension(&#039;import_multijournalentries&#039;)
gzopen(../modules/_cache/import_multijournalentries-2.3.0-4/_init/config): failed to open stream: No such file or directory in file: /srv/http/frontaccounting/includes/packages.inc at line 165
/srv/http/frontaccounting/includes/packages.inc:165:     gzopen(&#039;../modules/_cache/import_multijournalentries-2.3.0-4/_init/config&#039;,&#039;rb&#039;)
/srv/http/frontaccounting/includes/packages.inc:56:     get_control_file(&#039;../modules/_cache/import_multijournalentries-2.3.0-4/_init/config&#039;)
/srv/http/frontaccounting/includes/packages.inc:654:     (package Object)-&gt;install()
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension(&#039;import_multijournalentries&#039;)
Could not open
/srv/http/frontaccounting/includes/ui/ui_msgs.inc:14:     trigger_error(&#039;Could not open _init/files for writing.
This script does not support extracting this type of tar file.
Could not open file ../modules/_cache/import_multijournalentries-2.3.0-4/_data&#039;,&#039;256&#039;)
/srv/http/frontaccounting/includes/packages.inc:695:     display_error(&#039;Could not open _init/files for writing.
This script does not support extracting this type of tar file.
Could not open file ../modules/_cache/import_multijournalentries-2.3.0-4/_data&#039;)
/srv/http/frontaccounting/admin/inst_module.php:238:     install_extension(&#039;import_multijournalentries&#039;)</code></pre></div><p>So it is passing &quot;_init&quot; to is_dir, which should be fine (I see that folder in the pkg archive when I extract it by hand) except the folder never gets extracted to the import_multijournalentries-2.3.0-4 in _cache.</p><p>I&#039;ve been looking at the extract_files function in archive.inc but I don&#039;t know much php and can&#039;t quite make sense of it yet.</p>]]></content>
			<author>
				<name><![CDATA[kfrance]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18664</uri>
			</author>
			<updated>2013-10-25T16:33:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18215#p18215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18214#p18214" />
			<content type="html"><![CDATA[<p>The error suggests that the string passed to is_dir is not a valid path, but that doesn&#039;t make any sense. My best guess is a problem with permissions. </p><p>If it&#039;s not that, then I&#039;d like to know what the offending string contains.</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2013-10-25T16:14:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18214#p18214</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18213#p18213" />
			<content type="html"><![CDATA[<p>I&#039;ve been trying to track down the problem and think I&#039;ve made some progress but haven&#039;t figured it out completely. The import_multijournalentries-2.3.0-4.pkg file (that is the extension that I&#039;m trying to install) is downloaded in the tmp folder but the files aren&#039;t being properly extracted. A import_multijournalentries-2.3.0-4 folder is created in modules/_cache directory but it is empty. All the errors are coming from that because it expects the files to be there.</p>]]></content>
			<author>
				<name><![CDATA[kfrance]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=18664</uri>
			</author>
			<updated>2013-10-25T16:01:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18213#p18213</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't install extension]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=18196#p18196" />
			<content type="html"><![CDATA[<p>https://frontaccounting.com/punbb/viewtopic.php?pid=18192 seems to describe the same problem.</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2013-10-23T22:38:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=18196#p18196</id>
		</entry>
</feed>
