chuckrob
August 24th, 2008, 12:13 AM
I am getting an error in my admin panel to my website and therefore it wont let me compile my changes that I am making to other pages. In my cpanel, I have located the area of the error, but I am not very good at java script. Can someone please look at this cpanel script to see what is wrong:
{
$resKeysStrings = db_res("
SELECT `LocalizationKeys`.`Key` AS `Key`,
`LocalizationStrings`.`String` AS `String`
FROM `LocalizationStrings` INNER JOIN
`LocalizationKeys` ON
`LocalizationKeys`.`ID` = `LocalizationStrings`.`IDKey`
WHERE `LocalizationStrings`.`IDLanguage` = {$arrLanguage['ID']}");
$handle = fopen("{$dir['root']}langs/lang-{$arrLanguage['Name']}.php", 'w');
if($handle === false) return false;
$fileContent = "<?{$newLine}\$LANG = array(";
while($arrKeyString = mysql_fetch_assoc($resKeysStrings))
{
$langKey = str_replace("\\", "\\\\", $arrKeyString['Key']);
$langKey = str_replace("'", "\\'", $langKey);
$langStr = str_replace("\\", "\\\\", $arrKeyString['String']);
$langStr = str_replace("'", "\\'", $langStr);
$fileContent .= "{$newLine}\t'$langKey' => '$langStr',";
}
The following is the admin panel error message:
Warning: fopen(/home/sexiestf/public_html/langs/lang-English.php) [function.fopen]: failed to open stream: Permission denied in /home/sexiestf/public_html/inc/languages.inc.php on line 159
Language file(s) has NOT been compiled due to an error.
{
$resKeysStrings = db_res("
SELECT `LocalizationKeys`.`Key` AS `Key`,
`LocalizationStrings`.`String` AS `String`
FROM `LocalizationStrings` INNER JOIN
`LocalizationKeys` ON
`LocalizationKeys`.`ID` = `LocalizationStrings`.`IDKey`
WHERE `LocalizationStrings`.`IDLanguage` = {$arrLanguage['ID']}");
$handle = fopen("{$dir['root']}langs/lang-{$arrLanguage['Name']}.php", 'w');
if($handle === false) return false;
$fileContent = "<?{$newLine}\$LANG = array(";
while($arrKeyString = mysql_fetch_assoc($resKeysStrings))
{
$langKey = str_replace("\\", "\\\\", $arrKeyString['Key']);
$langKey = str_replace("'", "\\'", $langKey);
$langStr = str_replace("\\", "\\\\", $arrKeyString['String']);
$langStr = str_replace("'", "\\'", $langStr);
$fileContent .= "{$newLine}\t'$langKey' => '$langStr',";
}
The following is the admin panel error message:
Warning: fopen(/home/sexiestf/public_html/langs/lang-English.php) [function.fopen]: failed to open stream: Permission denied in /home/sexiestf/public_html/inc/languages.inc.php on line 159
Language file(s) has NOT been compiled due to an error.