FreiChat related discussions
FreiChatX Interesting Glitch...perhaps it's me

I installed FreiChatX.. followed the installation instructions... edited the parameters.... everything looks great.

I was testing the script using two different browsers, and different login credentials. Was working great.

Here is the issue:

When I typed a long message, using words with punctuation ie: "That's"... the message would not transmit. It seems to only be an apostrophe that causes this challenge.

Any thoughts?

I installed FreiChatX.. followed the installation instructions... edited the parameters.... everything looks great. I was testing the script using two different browsers, and different login credentials. Was working great. Here is the issue: When I typed a long message, using words with punctuation ie: "That's"... the message would not transmit. It seems to only be an apostrophe that causes this challenge. Any thoughts?

looks like you have magic_quotes_gpc enabled,try to put the below code in the first line of ~/freichat/server/freichat.php

if (get_magic_quotes_gpc()) {
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
while (list($key, $val) = each($process)) {
foreach ($val as $k => $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}

SOURCE: http://php.net/manual/en/security.magicquotes.disabling.php

looks like you have magic_quotes_gpc enabled,try to put the below code in the first line of ~/freichat/server/freichat.php <code> if (get_magic_quotes_gpc()) { $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process); } </code> SOURCE: http://php.net/manual/en/security.magicquotes.disabling.php
Necessity is the mother of all inventions!

Sorry to be so stupid... but I don't write code...ever.

You will need to be a little more specific about where to place this code. The first few lines of the freichat.php file contain the following code.

<?php session_start();
require("../define.php");

class freichat extends freichatXconstruct
{
public $userdata;
public $messages=array();

public function __construct()
{
parent::__construct();
require_once RDIR.'/server/drivers/'.$this->driver.'.php';
$this->url=str_replace('server/freichat.php','',$this->url);
$this->frm_id=$_SESSION[$this->uid.'usr_ses_id'];
$this->frm_name=$_SESSION[$this->uid.'usr_name'];
$this->connectDB();
}
//-------------------------------------------------------------------------
public function bigintval($value)
{
$value = trim($value);
if (ctype_digit($value)) {
return $value;
}
$value = preg_replace("/[^0-9](.*)$/", '', $value);
if (ctype_digit($value)) {
return $value;
}
return 0;
}
//----------------------------------------------------------------------------
public function makeClickableLinks($text)
{


SO....where exactly should I place this code? Sorry for being such a novice. But, I really like the script otherwise.

Sorry to be so stupid... but I don&#039;t write code...ever. You will need to be a little more specific about where to place this code. The first few lines of the freichat.php file contain the following code. &amp;lt;?php session_start(); require(&quot;../define.php&quot;); class freichat extends freichatXconstruct { public $userdata; public $messages=array(); public function __construct() { parent::__construct(); require_once RDIR.&#039;/server/drivers/&#039;.$this-&amp;gt;driver.&#039;.php&#039;; $this-&amp;gt;url=str_replace(&#039;server/freichat.php&#039;,&#039;&#039;,$this-&amp;gt;url); $this-&amp;gt;frm_id=$_SESSION[$this-&amp;gt;uid.&#039;usr_ses_id&#039;]; $this-&amp;gt;frm_name=$_SESSION[$this-&amp;gt;uid.&#039;usr_name&#039;]; $this-&amp;gt;connectDB(); } //------------------------------------------------------------------------- public function bigintval($value) { $value = trim($value); if (ctype_digit($value)) { return $value; } $value = preg_replace(&quot;/[^0-9](.*)$/&quot;, &#039;&#039;, $value); if (ctype_digit($value)) { return $value; } return 0; } //---------------------------------------------------------------------------- public function makeClickableLinks($text) { SO....where exactly should I place this code? Sorry for being such a novice. But, I really like the script otherwise.

the code will look like this after pasting

<?php session_start();
require("../define.php");
if (get_magic_quotes_gpc()) {
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
while (list($key, $val) = each($process)) {
foreach ($val as $k => $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
.
.
.

the code will look like this after pasting &amp;lt;code&amp;gt; &amp;lt;?php session_start(); require(&quot;../define.php&quot;); if (get_magic_quotes_gpc()) { $process = array(&amp;$_GET, &amp;$_POST, &amp;$_COOKIE, &amp;$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k =&amp;gt; $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &amp;$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process); } . . . &amp;lt;/code&amp;gt;
Necessity is the mother of all inventions!
67
4
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