FreiChat related discussions
Error FreichatX backend

Hi,
I have this message error after FreichatX 4.5 install:

Parse error: syntax error, unexpected '{' in /web/htdocs/www.115extreme.it/home/joomla/freichat/server/admin_files/home/index.php on line 1

this is index.php:

<?phpif (!isset($_SESSION['phplogin']) || $_SESSION['phplogin'] !== true) { header('Location: ../administrator/index.php'); //Replace that if login.php is somewhere else exit; } require("../arg.php");/********************************************************************************************/class param{ public function __construct() { $this->argpath="../arg.php"; $this->themepath='../client/jquery/freichat_themes/'; $this->langpath='../lang/'; $this->themeray=$this->langray=array(); }//-------------------------------------------------------------------------------------------- public function change_param($name,$files,$value) { //var_dump($value); foreach($files as $file) { $handle=$file; @chown($handle, "root"); @chmod($handle, 0777); $file_path=$file; $contents=file_get_contents($file_path,true); $values=null; foreach($value as $val) { if(strpos($contents,"\$".$name."='".$val."';")==true) { $values=$val; } else {} } $new_contents = str_replace("\$".$name."='".$values."';", "\$".$name."='".$_POST[$name]."';", $contents); file_put_contents($file_path, $new_contents); } }//-------------------------------------------------------------------------------------------- public function default_param($name,$files,$value) { $selected=false; //default html selected must be false foreach($files as $file) { $handle=$file; @chown($handle, "root"); @chmod($handle, 0777); $handle=$file; $contents=file_get_contents($handle,true); if(strpos($contents,"\$".$name."='".$value."';")==true) { $selected=true; } else {} } if($selected==true) { echo
.
.
.
.
.
.
m->argpath),"hide"); ?>>Minimized




9. Show Powered by

<select name="evnixpower"><option value="visible">default_param("evnixpower",array($param-&gt;argpath),"visible"); ?&gt;&gt;Yes</option>
<option value="hidden">default_param("evnixpower",array($param-&gt;argpath),"hidden"); ?&gt;&gt;No</option></select>



10. Remove Jquery Conflicts About

<select name="conflict"><option value="true">default_param("conflict",array($param-&gt;argpath),"true"); ?&gt;&gt;Yes</option>
<option value="">default_param("conflict",array($param-&gt;argpath),""); ?&gt;&gt;No</option></select>

11. Show Jquery Animations



<select name="fxval"><option value="true">default_param("fxval",array($param-&gt;argpath),"true"); ?&gt;&gt;Yes</option>
<option value="false">default_param("fxval",array($param-&gt;argpath),"false"); ?&gt;&gt;No</option></select>

12. Choose any Language



<select name="lang"><?phpif ($handle = opendir('../lang/')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && $file!='.svn') { $file_name=str_replace(".php", "", $file); echo '<option value='."$file_name "; $param->default_param("lang",array($param-&gt;argpath),$file_name); echo"&gt;$file_name"; } } closedir($handle);}else{ echo 'directory open failed';}?&gt;</select>

<input type="submit" style="height: 25px; width: 100px" value="SUBMIT">
Hi, I have this message error after FreichatX 4.5 install: Parse error: syntax error, unexpected &#039;{&#039; in /web/htdocs/www.115extreme.it/home/joomla/freichat/server/admin_files/home/index.php on line 1 this is index.php: &amp;lt;?phpif (!isset($_SESSION[&#039;phplogin&#039;]) || $_SESSION[&#039;phplogin&#039;] !== true) { header(&#039;Location: ../administrator/index.php&#039;); //Replace that if login.php is somewhere else exit; } require(&quot;../arg.php&quot;);/********************************************************************************************/class param{ public function __construct() { $this-&amp;gt;argpath=&quot;../arg.php&quot;; $this-&amp;gt;themepath=&#039;../client/jquery/freichat_themes/&#039;; $this-&amp;gt;langpath=&#039;../lang/&#039;; $this-&amp;gt;themeray=$this-&amp;gt;langray=array(); }//-------------------------------------------------------------------------------------------- public function change_param($name,$files,$value) { //var_dump($value); foreach($files as $file) { $handle=$file; @chown($handle, &quot;root&quot;); @chmod($handle, 0777); $file_path=$file; $contents=file_get_contents($file_path,true); $values=null; foreach($value as $val) { if(strpos($contents,&quot;\$&quot;.$name.&quot;=&#039;&quot;.$val.&quot;&#039;;&quot;)==true) { $values=$val; } else {} } $new_contents = str_replace(&quot;\$&quot;.$name.&quot;=&#039;&quot;.$values.&quot;&#039;;&quot;, &quot;\$&quot;.$name.&quot;=&#039;&quot;.$_POST[$name].&quot;&#039;;&quot;, $contents); file_put_contents($file_path, $new_contents); } }//-------------------------------------------------------------------------------------------- public function default_param($name,$files,$value) { $selected=false; //default html selected must be false foreach($files as $file) { $handle=$file; @chown($handle, &quot;root&quot;); @chmod($handle, 0777); $handle=$file; $contents=file_get_contents($handle,true); if(strpos($contents,&quot;\$&quot;.$name.&quot;=&#039;&quot;.$value.&quot;&#039;;&quot;)==true) { $selected=true; } else {} } if($selected==true) { echo . . . . . . m-&amp;gt;argpath),&quot;hide&quot;); ?&amp;gt;&amp;gt;Minimized&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;p&amp;gt;9. Show Powered by &amp;lt;/p&amp;gt;&amp;lt;select name=&quot;evnixpower&quot;&amp;gt;&amp;lt;option value=&quot;visible&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;evnixpower&quot;,array($param-&amp;gt;argpath),&quot;visible&quot;); ?&amp;gt;&amp;gt;Yes&amp;lt;/option&amp;gt;&amp;lt;option value=&quot;hidden&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;evnixpower&quot;,array($param-&amp;gt;argpath),&quot;hidden&quot;); ?&amp;gt;&amp;gt;No&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;p&amp;gt;10. Remove Jquery Conflicts &amp;lt;span onmousedown=&quot;helpme1()&quot;&amp;gt;&amp;lt;img src=&quot;&amp;lt;?php echo &#039;../client/jquery/img/about.jpeg&#039; ?&amp;gt;&quot; alt=&quot;About&quot;/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;select name=&quot;conflict&quot;&amp;gt;&amp;lt;option value=&quot;true&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;conflict&quot;,array($param-&amp;gt;argpath),&quot;true&quot;); ?&amp;gt;&amp;gt;Yes&amp;lt;/option&amp;gt;&amp;lt;option value=&quot;&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;conflict&quot;,array($param-&amp;gt;argpath),&quot;&quot;); ?&amp;gt;&amp;gt;No&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;p&amp;gt;11. Show Jquery Animations&amp;lt;/p&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;select name=&quot;fxval&quot;&amp;gt;&amp;lt;option value=&quot;true&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;fxval&quot;,array($param-&amp;gt;argpath),&quot;true&quot;); ?&amp;gt;&amp;gt;Yes&amp;lt;/option&amp;gt;&amp;lt;option value=&quot;false&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;fxval&quot;,array($param-&amp;gt;argpath),&quot;false&quot;); ?&amp;gt;&amp;gt;No&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;p&amp;gt;12. Choose any Language&amp;lt;/p&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;select name=&quot;lang&quot;&amp;gt;&amp;lt;?phpif ($handle = opendir(&#039;../lang/&#039;)) { while (false !== ($file = readdir($handle))) { if ($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot; &amp;&amp; $file!=&#039;.svn&#039;) { $file_name=str_replace(&quot;.php&quot;, &quot;&quot;, $file); echo &#039;&amp;lt;option value=&#039;.&quot;$file_name &quot;; $param-&amp;gt;default_param(&quot;lang&quot;,array($param-&amp;gt;argpath),$file_name); echo&quot;&amp;gt;$file_name&amp;lt;/option&amp;gt;&quot;; } } closedir($handle);}else{ echo &#039;directory open failed&#039;;}?&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr color=&quot;black&quot;&amp;gt;&amp;lt;/hr&amp;gt;&amp;lt;input type=&quot;submit&quot; style=&quot;height: 25px; width: 100px&quot; value=&quot;SUBMIT&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt; Other question: I can disable guest user on chat?

The code that you posted is absolutely correct ,

But i was wondering where are the line breaks and spaces in between.
Did you compress the file , or used anything similar to it.

Because when i copy paste your code in my localhost , i get the
same error what you are getting .

Obviously it would , because the single line comments are messing up
the code.

Try downloading FreiChatX 4.5 again and replacing the main.php file with it.

The code that you posted is absolutely correct , But i was wondering where are the line breaks and spaces in between. Did you compress the file , or used anything similar to it. Because when i copy paste your code in my localhost , i get the same error what you are getting . Obviously it would , because the single line comments are messing up the code. Try downloading FreiChatX 4.5 again and replacing the main.php file with it.
Necessity is the mother of all inventions!

Hi,
I have the same problem with version 4.6, I also tried with v4.5. I haven't altered the code.
I'm using the integration with Jomsocial on Joomla 1.5. (I tried with a fresh Joomla 1.6 I have exactly the same problem)

Parse error: syntax error, unexpected '{' in /home/promod/public_html/chat/server/admin_files/home/index.php on line 1

<?phpif (!isset($_SESSION['phplogin'])    || $_SESSION['phplogin'] !== true) {    header('Location: ../administrator/index.php'); //Replace that if login.php is somewhere else    exit;}require("../arg.php");/********************************************************************************************/class param{    public function __construct()    {      require("../arg.php");      $this->argpath="../arg.php";      $this->themepath='../client/jquery/freichat_themes/';      $this->langpath='../lang/';      $this->themeray=$this->langray=array();      $this->driver=$driver;    }//--------------------------------------------------------------------------------------------    public function change_param($name,$files,$value)    {	//var_dump($value);    foreach($files as $file)    {    $handle=$file;    @chown($handle, "root");    @chmod($handle, 0777);    $file_path=$file;     $contents=file_get_contents($file_path,true);     $values=null;      foreach($value as $val)      {            if(strpos($contents,"\$".$name."='".$val."';")==true)             {              $values=$val;             }       else {}      }     $new_contents = str_replace("\$".$name."='".$values."';", "\$".$name."='".$_POST[$name]."';", $contents);     file_put_contents($file_path, $new_contents);    }    }//--------------------------------------------------------------------------------------------    public function .
.
.
.
.
Yes<option value="false">default_param("fxval",array($param->argpath),"false"); ?>>No</option><br><br><p>12. Choose any Language</p><br><select name="lang"><?phpif ($handle = opendir('../lang/')) { while (false !== ($file = readdir($handle))) { if ($file != "." & $file != ".." && $file!='.svn') { $file_name=str_replace(".php", "", $file); echo '<option value='."$file_name "; $param->default_param("lang",array($param->argpath),$file_name); echo">$file_name"; } } closedir($handle);}else{ echo 'directory open failed';}?></select><br><hr color="black"><input type="submit" style="height: 25px; width: 100px" value="SUBMIT"><br>

Hi, I have the same problem with version 4.6, I also tried with v4.5. I haven&#039;t altered the code. I&#039;m using the integration with Jomsocial on Joomla 1.5. (I tried with a fresh Joomla 1.6 I have exactly the same problem) Parse error: syntax error, unexpected &#039;{&#039; in /home/promod/public_html/chat/server/admin_files/home/index.php on line 1 &amp;lt;code&amp;gt; &amp;lt;?phpif (!isset($_SESSION[&#039;phplogin&#039;]) || $_SESSION[&#039;phplogin&#039;] !== true) { header(&#039;Location: ../administrator/index.php&#039;); //Replace that if login.php is somewhere else exit;}require(&quot;../arg.php&quot;);/********************************************************************************************/class param{ public function __construct() { require(&quot;../arg.php&quot;); $this-&amp;gt;argpath=&quot;../arg.php&quot;; $this-&amp;gt;themepath=&#039;../client/jquery/freichat_themes/&#039;; $this-&amp;gt;langpath=&#039;../lang/&#039;; $this-&amp;gt;themeray=$this-&amp;gt;langray=array(); $this-&amp;gt;driver=$driver; }//-------------------------------------------------------------------------------------------- public function change_param($name,$files,$value) { //var_dump($value); foreach($files as $file) { $handle=$file; @chown($handle, &quot;root&quot;); @chmod($handle, 0777); $file_path=$file; $contents=file_get_contents($file_path,true); $values=null; foreach($value as $val) { if(strpos($contents,&quot;\$&quot;.$name.&quot;=&#039;&quot;.$val.&quot;&#039;;&quot;)==true) { $values=$val; } else {} } $new_contents = str_replace(&quot;\$&quot;.$name.&quot;=&#039;&quot;.$values.&quot;&#039;;&quot;, &quot;\$&quot;.$name.&quot;=&#039;&quot;.$_POST[$name].&quot;&#039;;&quot;, $contents); file_put_contents($file_path, $new_contents); } }//-------------------------------------------------------------------------------------------- public function . . . . . Yes&amp;lt;/option&amp;gt;&amp;lt;option value=&quot;false&quot;&amp;lt;?php $param-&amp;gt;default_param(&quot;fxval&quot;,array($param-&amp;gt;argpath),&quot;false&quot;); ?&amp;gt;&amp;gt;No&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;p&amp;gt;12. Choose any Language&amp;lt;/p&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;select name=&quot;lang&quot;&amp;gt;&amp;lt;?phpif ($handle = opendir(&#039;../lang/&#039;)) { while (false !== ($file = readdir($handle))) { if ($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot; &amp;&amp; $file!=&#039;.svn&#039;) { $file_name=str_replace(&quot;.php&quot;, &quot;&quot;, $file); echo &#039;&amp;lt;option value=&#039;.&quot;$file_name &quot;; $param-&amp;gt;default_param(&quot;lang&quot;,array($param-&amp;gt;argpath),$file_name); echo&quot;&amp;gt;$file_name&amp;lt;/option&amp;gt;&quot;; } } closedir($handle);}else{ echo &#039;directory open failed&#039;;}?&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr color=&quot;black&quot;&amp;gt;&amp;lt;/hr&amp;gt;&amp;lt;input type=&quot;submit&quot; style=&quot;height: 25px; width: 100px&quot; value=&quot;SUBMIT&quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt; &amp;lt;/code&amp;gt;

as you see, it is caused because everything is in one single line.
it might be caused by the editor that you use??

is your webserver apache or IIS?
which program did you use to decompress the archive?
did you upload the folder by FTP or did you upload the whole archive(preferred way) and then extracted it online?.

as you see, it is caused because everything is in one single line. it might be caused by the editor that you use?? is your webserver apache or IIS? which program did you use to decompress the archive? did you upload the folder by FTP or did you upload the whole archive(preferred way) and then extracted it online?.
Necessity is the mother of all inventions!

It's an Apache server.
I used the latest version of winrar to decompress it (never had any problem with it before) and then I uploaded everything using FTP.

I will give a shot using shell commands.

It&#039;s an Apache server. I used the latest version of winrar to decompress it (never had any problem with it before) and then I uploaded everything using FTP. I will give a shot using shell commands.

just upload the zip archive directly to the server and then decompress it there itself. i guess the FTP client could be causing the trouble but i am not very sure.

the error is caused because the code you pasted doesn't seem to have any line breaks. the whole code is in one line.

just upload the zip archive directly to the server and then decompress it there itself. i guess the FTP client could be causing the trouble but i am not very sure. the error is caused because the code you pasted doesn&#039;t seem to have any line breaks. the whole code is in one line.
Necessity is the mother of all inventions!

indeed it was the source of the problem, I can now edit the settings in the admin.

I succeeded to make it works on several websites, but on one of them It doesn't show up.
I'm using a template from yootheme which is a little bit special. for example the index.php redirect to an other file in /layouts/template.php , I added the extra code and it shows up when I check with firebug.

You can see the website here => http://www.promod-console.com

Any Idea to fix this ?

thank you in advance for your help.

indeed it was the source of the problem, I can now edit the settings in the admin. I succeeded to make it works on several websites, but on one of them It doesn&#039;t show up. I&#039;m using a template from yootheme which is a little bit special. for example the index.php redirect to an other file in /layouts/template.php , I added the extra code and it shows up when I check with firebug. You can see the website here =&amp;gt; http://www.promod-console.com Any Idea to fix this ? thank you in advance for your help.

I activated the debug, it seens like it cannot connect with my DB.
March 16, 2011, 7:12 pm: unable to connect to database ,check login parameters in arg.php
March 16, 2011, 7:12 pm: Incorrect Query in driver CBE check parameters


I checked again in arg.php, but this is the good parameters, i don't know what to do.
Oh BTW, I'm using Jomsocial's integration.

I activated the debug, it seens like it cannot connect with my DB. &amp;lt;cite&amp;gt;March 16, 2011, 7:12 pm: unable to connect to database ,check login parameters in arg.php March 16, 2011, 7:12 pm: Incorrect Query in driver CBE check parameters&amp;lt;/cite&amp;gt; I checked again in arg.php, but this is the good parameters, i don&#039;t know what to do. Oh BTW, I&#039;m using Jomsocial&#039;s integration.

I checked the site; it needed is not connecting to the database
try reinstalling it by selecting 'Joomla' as the driver.
Hopefully it should work.

I checked the site; it needed is not connecting to the database try reinstalling it by selecting &#039;Joomla&#039; as the driver. Hopefully it should work.
Necessity is the mother of all inventions!

I just did it, but it doesn't solve my problem

March 16, 2011, 7:34 pm: main.php loaded
March 16, 2011, 7:34 pm: unable to connect to database ,check login parameters in arg.php
March 16, 2011, 7:34 pm: Incorrect Query in driver CBE check parameters

I just did it, but it doesn&#039;t solve my problem March 16, 2011, 7:34 pm: main.php loaded March 16, 2011, 7:34 pm: unable to connect to database ,check login parameters in arg.php March 16, 2011, 7:34 pm: Incorrect Query in driver CBE check parameters

A new FreiChatX version has been released.

Try installing the latest version .
I think its related with your problem

A new FreiChatX version has been released. Try installing the latest version . I think its related with your problem
Necessity is the mother of all inventions!

i just had the same error, i just re-uploaded evriting using binary transfer mode, with my ftp client and now its working fine, hope this can help somebody

i just had the same error, i just re-uploaded evriting using binary transfer mode, with my ftp client and now its working fine, hope this can help somebody
hi :P
147
13
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