Ошибка при установке небольшого скрипта | Альтернативный Форум

Ошибка при установке небольшого скрипта

  • Автор темы Автор темы blazdie
  • Дата начала Дата начала
Статус
Закрыто для дальнейших ответов.

blazdie

Форумчанин
Регистрация
23.07.2006
Сообщения
320
Популярность
3
Карма
0
вообщемто это даже не скрипт это небольшой шаблончик сайта на php

при запуске в браузере выдает такую ошибку "Direct Access to this location is not allowed."

подскажите в чем трабла ? :(
 
кинь код
В принципе судя по ошибке, гриццо что скрипт не может получить доступ к папке или файлу, возможно проблема в правах...
 
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = split( '=', _ISO );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
if ( $my->id ) {
initEditor();
}
mosShowHead();
require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/templateConfig.inc.php");
require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/rt_splitmenu.php");
$forcehilite = false;
$topnav = rtShowHorizMenu($menu_name);
$sidenav = rtShowSubMenu($menu_name);
$tabcolor = rtGetTabColor();
$hilightid = rtGetHilightid();
?>

<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link rel="shortcut icon" href="./images/favicon.ico" />
<link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet" type="text/css" />
<link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/<?php echo $template_style; ?>_color.css" rel="stylesheet" type="text/css" />
<link href="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sIFR-screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sIFR-print.css" rel="stylesheet" type="text/css" media="print" />
<!--[if lte IE 6]>
<link href="./templates/<?php echo $mainframe->getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script src="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sifr.js" type="text/javascript"></script>
<script src="./templates/<?php echo $mainframe->getTemplate(); ?>/sifr/sifr-addons.js" type="text/javascript"></script>
</head>
<body class="page_bg <?php echo $menu_side; ?> <?php echo $template_style; ?>">
<a name="up" id="up"></a>
<div id="grunge_middle">
<div id="grunge_bottom">
<div id="grunge_top">
<div id="wrapper">
<div id="header">
<a href="<?php echo $mosConfig_live_site;?>"><img src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/ex2_header_<?php echo $template_style; ?>.jpg" alt="<?php echo $mosConfig_sitename; ?>" title="<?php echo $mosConfig_sitename; ?>" height="78" width="378" border="0" /></a>
<div id="user4">
<?php mosLoadModules('user4',-1); ?>
</div>
</div>
<div id="content_pad">
<div id="nav_menu">
<?php echo $topnav; ?>
</div>
<table class="nopad">
<tr valign="top">
<?php if ($menu_side=="left" && (trim($sidenav) || mosCountModules("left"))) { ?>
<td class="left">
<?php echo $sidenav; ?>
<?php mosLoadModules('left', -2); ?>
</td>
<?php } ?>
<td class="content">
<?php if ($position_banner=="first") { ?>
<?php if ($template_banner=="module") { ?>
<?php if (mosCountModules('banner')) { ?>
<div id="banner">
<?php mosLoadModules('banner', -1); ?>
</div>
<?php } ?>
<?php } else { ?>
<div id="banner">
<div id="bannerimage"></div>
</div>
<?php } ?>
<?php } ?>
<?php if (mosCountModules('user1') || mosCountModules('user2') || mosCountModules('user3')) { ?>
<div id="userblocks">
<table cellspacing="10" cellpadding="0" width="100%">
<tr valign="top">
<?php if (mosCountModules('user1')) { ?>
<td width="33%">
<?php mosLoadModules('user1',-2); ?>
</td>
<?php } ?>
<?php if (mosCountModules('user2')) { ?>
<td width="33%">
<?php mosLoadModules('user2',-2); ?>
</td>
<?php } ?>
<?php if (mosCountModules('user3')) { ?>
<td width="33%">
<?php mosLoadModules('user3',-2); ?>
</td>
<?php } ?>
</tr>
</table>
</div>
<?php } ?>
<?php if ($position_banner=="second") { ?>
<?php if ($template_banner=="module") { ?>
<?php if (mosCountModules('banner')) { ?>
<div id="banner">
<?php mosLoadModules('banner', -1); ?>
</div>
<?php } ?>
<?php } else { ?>
<div id="banner">
<div id="bannerimage"></div>
</div>
<?php } ?>
<?php } ?>
<div id="content">
<?php mosPathWay(); ?>
<?php mosMainBody(); ?>
</div>
<?php if (mosCountModules('bottom')) { ?>
<div id="bottom">
<?php mosLoadModules('bottom',-2); ?>
</div>
<?php } ?>
<div id="footer">
Design by <a href="http://www.rockettheme.com">RocketTheme</a>
</div>
</td>
<?php if ($menu_side=="right" && (trim($sidenav) || mosCountModules("right"))) { ?>
<td class="right">
<?php echo $sidenav; ?>
<?php mosLoadModules('right', -2); ?>
</td>
<?php } ?>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>

<?php
mosLoadModules( 'debug', -1 );
require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/sifr/sifr-" . $template_style . ".js.php");
?>
</body>
</html>
 
жесть...глюк описан в первой строчке, и состоит в том, на скоко я понял он не может загрузить язык из файла который ему нужен..
 
и как это исправить?
 
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO


судя по всему косяк в файле constant _ISO и как сказал рембо, чего то он точно не может подгрузить, только чего именно не понятно.

Что за скрипт то?
 
это шаблончик сайта одного....вот его пытаюсь установить и никак :(
 
ну что никто не знает как исправить?
 
Fared сказал(а):
ну что никто не знает как исправить?
The last item to review is the first line of every Mambo file:

defined( '_VALID_MOS' ) or
die( 'Direct Access to this location is not allowed.' );
Defining the constant _VALID_MOS is a security feature that prevents a site visitor, robot or spider from directly accessing any file in Mambo othe than the default entry point. If a file, say for instance 'mod_mainmenu.php', is accessed directly, '_VALID_MOS', which is defined only in the default entry point, will not have been defined and therefore the only thing the visitor will see is a statement that says Direct Access to this location is not allowed.

In the case of front end access the default entry point is the index.php file. In the administrator or back end section of a Mambo site there are two default entry points, index.php and index2.php. The purpose of having two default entry points in the back end will become more clear later in this article. The short explanation is that index.php is the default entry point for logging in. index2.php is the default entry point through which all requests are processed once a user has successfully logged in. A user can only access index2.php after successfully logging in.

Logging into Mambo's Back End
The first thing that Mambo does when './administrator/index.php', the log in file, is loaded,is to define the _VALID_MOS constant 1 to indicate that this is the parent file, or default entry point.

/** Set flag that this is a parent file */
define( "_VALID_MOS", 1 );
Т.е. для отладки можно тупо добавить первой строкой define( "_VALID_MOS", 1 ); или убрать к черту строку проверки определенности константы _VALID_MOS. Все имхо...
 
не ниче не выходит...

ладно тогда тупо на это забью... :)
 
Статус
Закрыто для дальнейших ответов.
Назад
Верх Низ