database query error

I have made a new html block, whose headline i had to translate for the language selection.

So i did it in the page builder and added a new language key in the language settings.

But now its not possible to sent mails, invite friends, and join as a new member.

There is also an error warning in the language settings

which says

Database query error
Query:
SELECT DISTINCT `LocalizationStrings`.`IDKey` AS `IDKey`, `LocalizationStrings`.`IDLanguage` AS `IDLanguage`, `LocalizationKeys`.`Key` AS `Key`, `LocalizationStrings`.`String` AS `String`, `LocalizationLanguages`.`Title` AS `Language`, `LocalizationCategories`.`Name` AS `Category` FROM `LocalizationStringParams` RIGHT JOIN `LocalizationKeys` ON (`LocalizationStringParams`.`IDKey` = `LocalizationKeys`.`ID`) LEFT JOIN `LocalizationStrings` ON (`LocalizationStrings`.`IDKey` = `LocalizationKeys`.`ID`) LEFT JOIN `LocalizationCategories` ON (`LocalizationKeys`.`IDCategory` = `LocalizationCategories`.`ID`) LEFT JOIN `LocalizationLanguages` ON (`LocalizationStrings`.`IDLanguage` = `LocalizationLanguages`.`ID`) ORDER BY `Language`, `Category`, `Key`
Mysql error:
Error writing file '/var/tmp/MYa9XrXw' (Errcode: 28)


Does anyone know how to fix it

thanks for your help

Quote · 4 Aug 2009

What did you put inside of that HTML block?  This has to be really good for you to have bumped into the Mail tables.  Also, what did you use for Language Key?

Quote · 4 Aug 2009

I put a swf  inside of this html block, and everything work correctly for a month. But since i translated the headline this error appears, as the language key i used the name of the headline.

That's the second part of the error code.

Maybe thats helpful

Thank you

Query:
SELECT DISTINCT `LocalizationStrings`.`IDKey` AS `IDKey`, `LocalizationStrings`.`IDLanguage` AS `IDLanguage`, `LocalizationKeys`.`Key` AS `Key`, `LocalizationStrings`.`String` AS `String`, `LocalizationLanguages`.`Title` AS `Language`, `LocalizationCategories`.`Name` AS `Category` FROM `LocalizationStringParams` RIGHT JOIN `LocalizationKeys` ON (`LocalizationStringParams`.`IDKey` = `LocalizationKeys`.`ID`) LEFT JOIN `LocalizationStrings` ON (`LocalizationStrings`.`IDKey` = `LocalizationKeys`.`ID`) LEFT JOIN `LocalizationCategories` ON (`LocalizationKeys`.`IDCategory` = `LocalizationCategories`.`ID`) LEFT JOIN `LocalizationLanguages` ON (`LocalizationStrings`.`IDLanguage` = `LocalizationLanguages`.`ID`) ORDER BY `Language`, `Category`, `Key`
Mysql error:
Error writing file '/var/tmp/MYE944li' (Errcode: 28)Debug backtrace:
Array
(
[1] => Array
(
[file] => /srv/www/vhosts/abi.net/httpdocs/community/adm/lang_file.php
[line] => 182
[function] => db_res
[args] => Array
(
[0] =>
SELECT DISTINCT
`LocalizationStrings`.`IDKey` AS `IDKey`,
`LocalizationStrings`.`IDLanguage` AS `IDLanguage`,
`LocalizationKeys`.`Key` AS `Key`,
`LocalizationStrings`.`String` AS `String`,
`LocalizationLanguages`.`Title` AS `Language`,
`LocalizationCategories`.`Name` AS `Category`
FROM `LocalizationStringParams`
RIGHT JOIN `LocalizationKeys` ON
(`LocalizationStringParams`.`IDKey` = `LocalizationKeys`.`ID`)
LEFT JOIN `LocalizationStrings` ON
(`LocalizationStrings`.`IDKey` = `LocalizationKeys`.`ID`)
LEFT JOIN `LocalizationCategories` ON
(`LocalizationKeys`.`IDCategory` = `LocalizationCategories`.`ID`)
LEFT JOIN `LocalizationLanguages` ON
(`LocalizationStrings`.`IDLanguage` = `LocalizationLanguages`.`ID`)

ORDER BY
`Language`, `Category`, `Key`
)

)

[2] => Array
(
[file] => /srv/www/vhosts/abi.net/httpdocs/community/adm/lang_file.php
[line] => 825
[function] => findLangStrings
[args] => Array
(
[0] =>
[1] =>
[2] => 1
[3] => 1
[4] => 1
[5] => Array
(
[0] => 1
)

[6] => Array
(
[0] => 1
)

)

)

[3] => Array
(
[file] => /srv/www/vhosts/abi.net/httpdocs/community/adm/lang_file.php
[line] => 1364
[function] => stringTableBlock
[args] => Array
(
[0] =>
)

)

)
Called script: /community/adm/lang_file.php
Request parameters:

Quote · 5 Aug 2009

Is it possible that there is no space left on my server?

Quote · 5 Aug 2009

And what did you name the language key?  That would be the _Name that you used for it.  No, this is not an issue with your server size, only that you've created duplicate language keys.  What did you name it and maybe we can help you fix it.

 

ALSO

GET

YOUR

LOGIN

CREDENTIALS

OUT

OF

THAT

POST

IN

GREEN

BEFORE

YOU

GET

HACKED

INTO

THE

NEXT

CENTURY

 

Quote · 5 Aug 2009

Is it possible that there is no space left on my server?

It is possible. Error writing file '/var/tmp/MYa9XrXw' (Errcode: 28)

Seems the mysql server is trying to create a temp file and it can't, so yes. I would look into low drive space.

https://www.deanbassett.com
Quote · 5 Aug 2009

thanks for your help so far, don't worry the login credentials aren't the real one, but its not neccessary so i took them out. I named it  Viel Spass, Euer abi.net Team (but without the "_").  Before i posted my problem i deleted it in the language settings, but the problem was still there.

Now the language key is called _Viel Spass, Euer abi.net Team with german string : Viel Spass, Euer abi.net Team

and english string: have fun! Yours abi.net team.

Quote · 6 Aug 2009

so your suggestion is: to search for that language key name in the database  and delete the duplicate.

Is this correct?

Quote · 6 Aug 2009

That's what I'm seeing, Dean is seeing a potential issue with memory.  Not sure which of us is right here, you'll have to let us know.  Personally, I'm hoping it's Dean on this one. 

 

I'd have to know German to tell you if that Language Key would be an issue. 

Quote · 7 Aug 2009

Ok, i cleaned the duplicate ones in  database but the error is still there.

So now my next step will be to clean the temp files on the server.

Hope this works, i will let you know.

Thanks so far for your help.

Quote · 7 Aug 2009

Marco, you may also need to delete and recreate the original ones that you accidentally duplicated as it probably changed the end result of them. 

 

Keep this in mind, when you create a new language key in the Admin Panel you are writing directly to the Database, and this in turn changes the results for any entry.  It's not the same as running an SQL where you create a table and then insert into that table, this time you rewrote the table.

 

Instead, what you did was changed the table.  You will need to find out what it was originally and rewrite it back to what it was before you.  To help you out, note the error it's giving you:

 

adm/lang_file.php  Line 182

 

 

function implodeNonEmpty($strGlue, $arr) {
  foreach ($arr as $key => $val)
   if (strlen($val) <= 0) unset($arr[$key]);

  return implode($strGlue, $arr);
 }

 if ( strlen($searchText) > 0 ) {
  $searchText = addslashes($searchText);

  $likeWildcards = array ('%', '_');
  $likeWildcardsEscaped = array('\%', '\_');

  $searchText = str_replace($likeWildcards, $likeWildcardsEscaped, $searchText);

  $arrWords = preg_split("/\s+/", $searchText, -1, PREG_SPLIT_NO_EMPTY);
  
  foreach( $arrWords as $key => $val )
   $arrWords[$key] = strtoupper( $val );
  
  $sqlSearchInKeys = $searchInKeys ? sqlLikeClause('UPPER(`LocalizationKeys`.`Key`)', $arrWords, $groupWords) : '';
  $sqlSearchInStrings = $searchInStrings ? sqlLikeClause('UPPER(`LocalizationStrings`.`String`)', $arrWords, $groupWords) : '';
  $sqlSearchInParams = $searchInParams ? sqlLikeClause('UPPER(`LocalizationStringParams`.`Description`)', $arrWords, $groupWords) : '';

  $sqlSearchClause = implodeNonEmpty(' OR ', array($sqlSearchInKeys, $sqlSearchInStrings, $sqlSearchInParams));

  $sqlSearchClause = "($sqlSearchClause)";
 } else
  $sqlSearchClause = '';

 $sqlSearchInCategories = sqlInClause('`LocalizationCategories`.`ID`', $arrCategoryIDs);
 $sqlSearchInLanguages = sqlInClause('`LocalizationLanguages`.`ID`', $arrLanguageIDs);

 $sqlWhereClause = implodeNonEmpty(' AND ', array($sqlSearchClause, $sqlSearchInCategories, $sqlSearchInLanguages));

 if ( strlen($sqlWhereClause) )
  $sqlWhereClause = "WHERE $sqlWhereClause ";
 else
  $sqlWhereClause = '';

 $sql = "
  SELECT DISTINCT
    `LocalizationStrings`.`IDKey`  AS `IDKey`,
    `LocalizationStrings`.`IDLanguage` AS `IDLanguage`,
    `LocalizationKeys`.`Key`   AS `Key`,
    `LocalizationStrings`.`String`  AS `String`,
    `LocalizationLanguages`.`Title`  AS `Language`,
    `LocalizationCategories`.`Name`  AS `Category`
  FROM `LocalizationStringParams`
  RIGHT JOIN `LocalizationKeys` ON
   (`LocalizationStringParams`.`IDKey` = `LocalizationKeys`.`ID`)
  LEFT JOIN `LocalizationStrings` ON
   (`LocalizationStrings`.`IDKey` = `LocalizationKeys`.`ID`)
  LEFT JOIN `LocalizationCategories` ON
   (`LocalizationKeys`.`IDCategory` = `LocalizationCategories`.`ID`)
  LEFT JOIN `LocalizationLanguages` ON
   (`LocalizationStrings`.`IDLanguage` = `LocalizationLanguages`.`ID`)
  $sqlWhereClause
  ORDER BY
   `Language`, `Category`, `Key`";
 
 $resSearchResult = db_res($sql);                 (Line 182 Here)

 return $resSearchResult;
}

 

 

adm/lang_file.php  Line 825

 

 function deleteLanguageKey()
 {
  $langKeyID = (int)$_POST['DeleteLangKey'];
  $resKey = db_res('SELECT `Key` FROM `LocalizationKeys` WHERE `ID` = '.$langKeyID);
  if ( !mysql_num_rows($resKey) )
   return '<font color="red">Error: language key not found.</font>';
  
  db_res('DELETE FROM `LocalizationKeys` WHERE `ID`='.$langKeyID);
  db_res('DELETE FROM `LocalizationStrings` WHERE `IDKey` = '.$langKeyID);
  db_res('DELETE FROM `LocalizationStringParams` WHERE `IDKey` = '.$langKeyID);

  if (!compileLanguage())
   return '<font color="red">Error: could not recompile language files.</font>';

  $arrKey = mysql_fetch_assoc($resKey);

  return '<font color="green">The <b>'.htmlspecialchars($arrKey['Key']).'</b> language key has been successfully removed.</font>';
 }

 if ( isset($_POST['DeleteLangKey']) )
  $resultMsg = deleteLanguageKey();

 global
  $searchString,
  $searchCombineWordsAs,
  $searchInKeys,
  $searchInStrings,
  $searchInParams,
  $searchCategories,
  $searchLanguages;

 $res = findLangStrings(
 $searchString,
 $searchCombineWordsAs,
 $searchInKeys,
 $searchInStrings,
 $searchInParams,
 $searchCategories,
 $searchLanguages);                      (Line 825)

 ob_start();
?>

 

 

adm/lang_file.php Line 1364

 

<?
ContentBlockFoot();
echo manageLanguagesBlock();

echo searchBlock();

echo stringTableBlock($_GET['showMoreThanMax']=='yes' ? true : false);  (Line 1364)

BottomCode();

Basically, this is saying that it can't search the language files because of a change you made to them.  Try these steps:

 

1.  Attempt to recompile the language and see what the end results are:  If it works your getting off easy.

 

2.  Go into your SQL Databases and ask it to check & repair the tables.  Again, if it works your getting of easy.

 

3.  Locate the item you duplicated and get it back to what it was originally before your changes. 

 

**Also, have you tried running your site in english since this started?  Curious if this is across the board in all language files or just the German language.  I have listed the full sections of code where the errors are appearing in a Base/unmodified D6.1.6 system.  Please note also, your file path is showing:

 

adm/lang_file.php

 

The unmodified shows it as admin/lang_file.php

 

Is there a reason you have changed the directory name from admin to adm  ?  Curious on this as it may also be part of the problem your incurring, if you have not changed everything that reflects the admin/ directory to adm/  It's easy to miss something in a process like this and not even realize it.

 

 

Quote · 7 Aug 2009

Hi, ok i tried everything you wrote, but the error is still there.

I even put a backup-file of the LocalizationStringParams, LocalizationCategories, LocalizationLanguages, LocalizationStrings and LocalizationKeys into the database. But nothing changed.

The admin folder was called adm from the beginning and everything should be alright, here.

I will now contact a php expert locally to help me out.

I will let you know when the problem is fixed. and thank you very much  for your detailed help.

Quote · 11 Aug 2009

Hallo,

the problem is solved, after restarting the server the database error disappeared.

Yeah!!!!!!!!!!!!!!!!!!!

Quote · 13 Aug 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.