FreiChat related discussions
installed on a local sever

Hi,
i have installed FreiChatX 4.6.2 on a local network "mysite.local". The Site is also accessible from outside "www.mysite.de". From the local Network i have always "no user online". Can i install the Chat from a local Network to work with a real Domain?
In the Moment i have no Chance to test it from the domain :-(

Greetings
Dope

Hi, i have installed FreiChatX 4.6.2 on a local network "mysite.local". The Site is also accessible from outside "www.mysite.de". From the local Network i have always "no user online". Can i install the Chat from a local Network to work with a real Domain? In the Moment i have no Chance to test it from the domain :-( Greetings Dope

What do you mean by install chat from a local network to work with a
real domain ?

And you can easily test FreiChatX in your local network by opening two browsers

What do you mean by install chat from a local network to work with a real domain ? And you can easily test FreiChatX in your local network by opening two browsers
Necessity is the mother of all inventions!

the Server who host the site have one local domain "mysite.local" for the internal network and is also accessible from the internet with a normal domain "www.mysite.com" (forwarding). The chat installation was from the local domain.
I open the Site with mysite.local all others open it with www.mysite.com

When i open two browsers in the local network it works. when i open the site from the local network i dont see other members in the chat (members from "www.mysite.com").

Is there any line who takes the internal Adress from the install script or is there no way internal and external together?

the Server who host the site have one local domain "mysite.local" for the internal network and is also accessible from the internet with a normal domain "www.mysite.com" (forwarding). The chat installation was from the local domain. I open the Site with mysite.local all others open it with www.mysite.com When i open two browsers in the local network it works. when i open the site from the local network i dont see other members in the chat (members from "www.mysite.com"). Is there any line who takes the internal Adress from the install script or is there no way internal and external together?

if you have installed it on mysite.local then FreiChatX wont work on www.mysite.com.
That is because of the security provided by javascript.(Same Origin Policy)

But there is a workaround,
in your template(where you have copy pasted the code), load the script tag according to the domain
for example,

if(DOMAIN_IS_MYSITE.LOCAL)
{

echo '<script src="http://MYSITE.LOCAL/freichat/client/main.php........%0D%0A%7D%0D%0Aelse%0D%0A%7B%0D%0Aecho%20'<script%20src=" http:>
hope you understand what i am trying to say! by javascript.(Same Origin Policy)

But there is a workaround,
in your template(where you have copy pasted the code), load the script tag according to the domain
for example,

hope you understand what i am trying to say!

if you have installed it on mysite.local then FreiChatX wont work on www.mysite.com. That is because of the security provided by javascript.(Same Origin Policy) But there is a workaround, in your template(where you have copy pasted the code), load the script tag according to the domain for example, &amp;lt;code&amp;gt; if(DOMAIN_IS_MYSITE.LOCAL) { echo &#039;&amp;lt;script src=&quot;http://MYSITE.LOCAL/freichat/client/main.php........ } else { echo &#039;&amp;lt;script src=&quot;http://WWW.MYSITE.COM/freichat/client/main.php........ } &amp;lt;/code&amp;gt; hope you understand what i am trying to say!
Necessity is the mother of all inventions!

Thanks for your help,

i tried this script:

<div class="freichathtml" id="freichathtml"> 
<?php $local = 'mysite.local';
$www = 'www.mysite.com';

if($local){

echo '<script src="http://mysite.local/freichat/client/main.php>';
}
elseif ($www) {
{
echo '<script src="http://www.mysite.com/freichat/client/main.php>';%0D%0A%7D%0D%0Aelse%20%7B%0D%0Aecho%20'<script%20src=" http:>';
?>


but its the same :-(. There no user online (two browser local works fine)

P.S. in the frei_session table there are only entrys from local id="freichathtml">
<?php
$local = 'mysite.local';
$www = 'www.mysite.com';

if($local){

echo '<script src="http://mysite.local/freichat/client/main.php>';
}
elseif ($www) {
{
echo '<script src="http://www.mysite.com/freichat/client/main.php>';
}
else {
echo '<script src="http://mysite.com/freichat/client/main.php>';
?>


but its the same :-(. There no user online (two browser local works fine)

P.S. in the frei_session table there are only entrys from localy internal and external together?

</script></div>

Thanks for your help, i tried this script: &amp;lt;code&amp;gt; &amp;lt;div class=&quot;freichathtml&quot; id=&quot;freichathtml&quot;&amp;gt; &amp;lt;?php $local = &#039;mysite.local&#039;; $www = &#039;www.mysite.com&#039;; if($local){ echo &#039;&amp;lt;script src=&quot;http://mysite.local/freichat/client/main.php&amp;gt;&#039;; } elseif ($www) { { echo &#039;&amp;lt;script src=&quot;http://www.mysite.com/freichat/client/main.php&amp;gt;&#039;; } else { echo &#039;&amp;lt;script src=&quot;http://mysite.com/freichat/client/main.php&amp;gt;&#039;; ?&amp;gt; &amp;lt;/code&amp;gt; but its the same :-(. There no user online (two browser local works fine) P.S. in the frei_session table there are only entrys from local

this must be used in the head section, make sure you only replace the script tag that you copy pasted. The remaning code must remain intact. the below code wont work for 'www.', just make the necessary changes.
<?php if(strpos($_SERVER['HTTP_HOST'],'mysite.local')===false)
{
echo '<script src="http://mysite.com/freichat/client/main.php?id='.$ses.'>';
}
else
{
echo '<script src="http://mysite.local/freichat/client/main.php?id='.%24ses.'&gt;&lt;/script&gt;';%0D%0A%7D%0D%0A?&gt;"></script>

this must be used in the head section, make sure you only replace the script tag that you copy pasted. The remaning code must remain intact. the below code wont work for &#039;www.&#039;, just make the necessary changes. &amp;lt;?php if(strpos($_SERVER[&#039;HTTP_HOST&#039;],&#039;mysite.local&#039;)===false) { echo &#039;&amp;lt;script src=&quot;http://mysite.com/freichat/client/main.php?id=&#039;.$ses.&#039;&amp;gt;&amp;lt;/script&amp;gt;&#039;; } else { echo &#039;&amp;lt;script src=&quot;http://mysite.local/freichat/client/main.php?id=&#039;.$ses.&#039;&amp;gt;&amp;lt;/script&amp;gt;&#039;; } ?&amp;gt;
Necessity is the mother of all inventions!
96
5
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft