B
B
BloodySucker2015-08-18 02:53:22
PHP
BloodySucker, 2015-08-18 02:53:22

Smarty not working, Error 500?

<?php
//соединение с бд
require_once "db.php";
//сессия
session_name("xlandcms");
session_start();
//подключаем функции
require_once 'fnc.php';
//подключаем классы
require_once 'class.php';
//подключаем конфиг

require_once 'config.php';
//подключаем smarty
define('SMARTY_TEMPLATE_LOAD','../../style/'.$setup['skin'].'/');
require_once '../smarty/Smarty.class.php';
echo 'Class';
$smarty = new Smarty();
echo 'Class';
$smarty->template_dir = SMARTY_TEMPLATE_LOAD.'templates/';
$smarty->compile_dir = SMARTY_TEMPLATE_LOAD.'templates_c/';
$smarty->config_dir = SMARTY_TEMPLATE_LOAD.'configs/';
$smarty->cache_dir = SMARTY_TEMPLATE_LOAD.'cache/';
$smarty->assign('home',$home);
$smarty->assign('message',$message);
$smarty->assign('user',$user);
$smarty->assign('id',$id);
$smarty->assign('setup',$setup);
$smarty->assign('realtime',$realtime);
$smarty->assign('start',$start);
$smarty->assign('admin',$admin);
?>

After the directive new Smarty(); there is an error 500.
Smarty with of. website, latest version available.
How to be? The issue is very hot, because before the 20th I have to add a new version of the site, based on the old one, and also to subordinate this moment, which occurs only on the new server.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-08-20
@27cm

error 500 occurs

You need to determine what exactly is wrong.
1. Turn on error
reporting php.net/manual/ru/function.error-reporting.php
2. See what's in the php and web server logs
3. Study:
www.smarty.net/docs/en/installing.smarty. basic.tpl
www.smarty.net/docs/en/installing.smarty.extended.tpl
4. Ideally (for the future), set up a debugger, such as xdebug, and step by step find what the error is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question