<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5996&amp;type=atom" />
	<updated>2015-11-01T13:04:55Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5996</id>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24605#p24605" />
			<content type="html"><![CDATA[<p>@joe: Would you like to correct the commented out line in session.inc (Post 4 in this thread) to match tm/George&#039;s construct?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-11-01T13:04:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24605#p24605</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24597#p24597" />
			<content type="html"><![CDATA[<p>Thanks for the responses, I have now resolved the problem.&nbsp; As was suggested by TM, I adjusted the file path, as all of my permissions were correct.</p><br /><p>While I had figured out what the problem was, not being able to read &quot;PHP&quot; prevented me from seeing the solution staring me right in the face.</p><p>The issue was that I did not understand that the syntax <em>dirname(__FILE__).</em> represented the relative path for the running script.&nbsp; As TM mentioned, </p><div class="quotebox"><cite>TM wrote:</cite><blockquote><p>The function dirname(__FILE__) returns the path to the running script.</p></blockquote></div><p>&nbsp; This was why my entries were all being evaluated relative to the <em>includes</em> directory, even when I thought I was entering an absolute path.</p><p>I have now set it to be </p><div class="quotebox"><blockquote><p><em>ini_set(&#039;session.save_path&#039;, dirname(__FILE__).&#039;/../tmp/&#039;);</em></p></blockquote></div><p> which will give me the expected <em>WEBROOT/tmp</em> location, and is also &quot;portable&quot; if I were to move my installation to another folder/directory.</p><p>Thanks again to all who responded with suggestions.</p><br /><p>Hope the explanation helps anyone else who may stumble on this issue as I did.&nbsp; Now, on to evaluate FA on its merits.</p>]]></content>
			<author>
				<name><![CDATA[George]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20790</uri>
			</author>
			<updated>2015-11-01T00:25:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24597#p24597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24594#p24594" />
			<content type="html"><![CDATA[<p>I posted earlier and deleted thinking I was off topic. I am posting again, see if it helps.</p><p><strong>Before the installation wizard</strong><br />After decompressing the files to the frontaccounting installation folder, run the following commands:<br />(change <em>/var/www/html/frontaccounting</em> to your FrontAccounting installation path)</p><div class="codebox"><pre><code>sudo chown -R www-data:www-data /var/www/html/frontaccounting</code></pre></div><p><strong>Then run the installation wizard and get yourself setup</strong></p><p><strong>After the installation wizard,</strong> run the following, to revoke user <em>www-data</em> write access to the config files<br /></p><div class="codebox"><pre><code>sudo chown root:root /var/www/html/frontaccounting/config.php
sudo chown root:root /var/www/html/frontaccounting/config_db.php</code></pre></div><br /><p>Typical config.php modifications after installation:<br />-timezone<br />-show users online<br />-login max 3 times (brute force prevention)</p><p>Check security on the diagnostics link in FrontAccounting to confirm it is good to go.</p>]]></content>
			<author>
				<name><![CDATA[albertolima]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=1640</uri>
			</author>
			<updated>2015-10-31T11:55:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24594#p24594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24592#p24592" />
			<content type="html"><![CDATA[<p>... Or create the folder it wants / expects ..... <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-10-31T06:13:33Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24592#p24592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24586#p24586" />
			<content type="html"><![CDATA[<p>here, the file and directory permission is the problem. you should check the permissions before you try other options.</p><p>may be the parent or folder, which doesnot have the access to work on.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2015-10-31T05:04:33Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24586#p24586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24583#p24583" />
			<content type="html"><![CDATA[<p>Of course it&#039;s relative to the &quot;includes&quot; directory, because that&#039;s where session.inc resides. The function dirname(__FILE__) returns the path to the running script.</p><p>You can either use an absolute path:<br />ini_set(&#039;session.save_path&#039;, &#039;/opt/FrontAccounting/tmp/&#039;);</p><p>or append the relative path to the current directory:<br />ini_set(&#039;session.save_path&#039;, dirname(__FILE__).&#039;/../tmp/&#039;);</p><p>I recommend the latter, as it does not make any assumption about where FA is actually installed.</p>]]></content>
			<author>
				<name><![CDATA[tm]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17873</uri>
			</author>
			<updated>2015-10-31T04:30:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24583#p24583</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24582#p24582" />
			<content type="html"><![CDATA[<p>I have figured out the issue, but not a valid solution.</p><p>I set the session.save_path setting as directed in the&nbsp; includes/session.inc file.&nbsp; However, I am seeing various errors, which suggests that there is a problem with parsing the path as set in the file.</p><p>1.&nbsp; If I use <em>ini_set(&#039;session.save_path&#039;, dirname(__FILE__).&#039;/tmp/&#039;);</em> - that is setting the path to /tmp, then I get the following errors:<br /></p><div class="codebox"><pre><code>Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/opt/FrontAccounting/includes/tmp/)</code></pre></div><p>2. if If I use <em>ini_set(&#039;session.save_path&#039;, dirname(__FILE__).&#039;./tmp/&#039;);</em> - that is setting the relative tmp path to /opt/FrontAccounting/tmp, then I get the following errors:<br /></p><div class="codebox"><pre><code>Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/opt/FrontAccounting/includes./tmp/)</code></pre></div><p>3. if If I use <em>ini_set(&#039;session.save_path&#039;, dirname(__FILE__).&#039;/opt/FrontAccounting/tmp/&#039;);</em> - that is explicitly setting the path to /opt/FrontAccounting/tmp, then I get the following errors:<br /></p><div class="codebox"><pre><code> Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/opt/FrontAccounting/includes/opt/FrontAccounting/tmp/)</code></pre></div><p>It looks like the path is being read as relative to ./includes and not from the Dir_Root <em>(/opt/FrontAccounting)</em>.&nbsp; <br />If I make a symlink in ./included pointing to /opt, thereby making the paths valid, then everything seems to work (so far).&nbsp; However, i don&#039;t know what else would end up breaking with this workaround, so I would prefer not to have to use it.</p>]]></content>
			<author>
				<name><![CDATA[George]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20790</uri>
			</author>
			<updated>2015-10-30T21:29:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24582#p24582</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24581#p24581" />
			<content type="html"><![CDATA[<p>The tmp folder in the FrontAccounting webroot needs to be writeable by the webserver process www-data - that is where the sessions get stored in your install. These settings are in the includes/session.inc file in line 387 commented out as it is expected to be set in the php.ini file&#039;s session.save_path setting.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-10-29T15:30:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24581#p24581</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24580#p24580" />
			<content type="html"><![CDATA[<p>Don&#039;t have a .htacess file in place.&nbsp; And I do have full access to the server.</p>]]></content>
			<author>
				<name><![CDATA[George]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20790</uri>
			</author>
			<updated>2015-10-29T12:22:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24580#p24580</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24579#p24579" />
			<content type="html"><![CDATA[<p>Remove the .htaccess file and check - then tweak it.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-10-29T10:53:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24579#p24579</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Errors in new install of FrontAccounting - wrong Webroot Path]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=24575#p24575" />
			<content type="html"><![CDATA[<p>A new installation on Ubuntu.&nbsp; (FrontAccounting Version 2.3.24 Build 26.10.2015)</p><p>Eventually managed to get everything setup, and can login.&nbsp; However, having an issue.<br />After clicking on any link, I&#039;m returned to the login screen.&nbsp; If I login, then I get to that previously clicked page, but I have to login after every click.</p><p>On the page(s), I get 4 lines of&nbsp; errors:</p><p>session_start(): open(/opt/FrontAccounting/includes/opt/FrontAccounting/tmp//sess_hpsp7onb2fq9l0a05p85ts8in5, O_RDWR) failed: No such file or directory (2) in file: /opt/FrontAccounting/includes/session.inc at line 29<br />session_write_close(): open(/opt/FrontAccounting/includes/opt/FrontAccounting/tmp//sess_k7f4dqh3h1k89mnh9r8i189cj2, O_RDWR) failed: No such file or directory (2) in file: /opt/FrontAccounting/includes/session.inc at line 86<br />session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/opt/FrontAccounting/includes/opt/FrontAccounting/tmp/) in file: /opt/FrontAccounting/includes/session.inc at line 86<br />session_start(): open(/opt/FrontAccounting/includes/opt/FrontAccounting/tmp//sess_k7f4dqh3h1k89mnh9r8i189cj2, O_RDWR) failed: No such file or directory (2) in file: /opt/FrontAccounting/includes/session.inc at line 90</p><p>The application is installed at /opt/FrontAccounting, which is the webroot for the V-host.&nbsp; Apparently, the script is picking up the directory as a relative path as opposed to an absolute, and thus, is duplicating it, as in &quot;/opt/FrontAccounting/includes/opt/FrontAccounting/tmp//&quot;. Note that there is also a double slash at the end of the path.</p><p>I have checked the permissions and they seem to be OK.</p><p>Any pointers?</p>]]></content>
			<author>
				<name><![CDATA[George]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20790</uri>
			</author>
			<updated>2015-10-28T21:30:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=24575#p24575</id>
		</entry>
</feed>
