<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Authentication - Issues with multiple instances on the same server.</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Authentication - Issues with multiple instances on the same server.</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 00:29:10 +0000</pubDate>

<item>
<title>yuniar on "Authentication - Issues with multiple instances on the same server."</title>
<link>https://www.machform.com/forums/topic/authentication-issues-with-multiple-instances-on-the-same-server#post-17096</link>
<pubDate>Wed, 06 Feb 2013 20:16:26 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">17096@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Bard,&#60;/p&#62;
&#60;p&#62;Thank you for sharing this.&#60;br /&#62;
MachForm wasn't designed to be installed multiple times under the same domain/sub domain indeed.&#60;/p&#62;
&#60;p&#62;These won't work:&#60;br /&#62;
&#60;a href=&#34;http://example.com/machform1&#34; rel=&#34;nofollow&#34;&#62;http://example.com/machform1&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://example.com/machform2&#34; rel=&#34;nofollow&#34;&#62;http://example.com/machform2&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://example.com/machform3&#34; rel=&#34;nofollow&#34;&#62;http://example.com/machform3&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;However, these should work just fine:&#60;br /&#62;
&#60;a href=&#34;http://machform1.example.com&#34; rel=&#34;nofollow&#34;&#62;http://machform1.example.com&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://machform2.example.com&#34; rel=&#34;nofollow&#34;&#62;http://machform2.example.com&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://machform3.example.com&#34; rel=&#34;nofollow&#34;&#62;http://machform3.example.com&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;So if you need to install multiple instance of MachForm, I suggest to install each of them using separate sub domains.&#60;br /&#62;
Using separate subdomain for each instance, you won't need to do any modification.&#60;/p&#62;
&#60;p&#62;However, if it's not possible to have subdomains, then the solution you provide above should be working just fine :)
&#60;/p&#62;</description>
</item>
<item>
<title>holtbakk on "Authentication - Issues with multiple instances on the same server."</title>
<link>https://www.machform.com/forums/topic/authentication-issues-with-multiple-instances-on-the-same-server#post-17089</link>
<pubDate>Wed, 06 Feb 2013 17:09:38 +0000</pubDate>
<dc:creator>holtbakk</dc:creator>
<guid isPermaLink="false">17089@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi!&#60;/p&#62;
&#60;p&#62;As always I have to start by saying how much I appreciate this software! :)&#60;/p&#62;
&#60;p&#62;Than to my issue. I have one server with multiple installed instances of machform. Some are modified, some are running old licenses, some are purchased by others, and so on. Checking session authentication only with a true/false value seems to allow access to all admin interfaces by authenticating on one of them. Maybe this is an issue only to me, but I'd thought I should let you know and supply a suggestion for a fix:&#60;/p&#62;
&#60;p&#62;This could be solved with only a few lines of code by checking against an per-site-dynamic key set in &#60;em&#62;config.php&#60;/em&#62;. Either  an manually set key:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$_SESSION[&#38;#39;local_key&#38;#39;] = “myvalue”;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Or an automated that is unique to each instance using its path:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$_SESSION[&#38;#39;local_key&#38;#39;] = md5(dirname(__FILE__));&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And after the authentication (on line 55 &#38;#38; 108 in &#60;em&#62;index,php&#60;/em&#62; and line 36 in &#60;em&#62;includes/check-session.php&#60;/em&#62;) add:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$_SESSION[&#38;#39;mf_logged_in_key&#38;#39;]  = $_SESSION[&#38;#39;local_key&#38;#39;];&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And finally add this check to the authentication-checkers (12 instances?)&#60;/p&#62;
&#60;p&#62;&#60;code&#62;if( … &#38;#38;&#38;#38; $_SESSION[&#38;#39;mf_logged_in_key&#38;#39;]  === $_SESSION[&#38;#39;local_key&#38;#39;] ){ .. }&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Regards, Bard
&#60;/p&#62;</description>
</item>

</channel>
</rss>
