1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error code 500

Discussion in 'General PHP and MySQL Discussions' started by RamzanHD, Apr 6, 2016.

  1. RamzanHD

    RamzanHD Active Member

    hey guys im trying to make a custom page and this is the error i get
    http://gam3on.com/styles/demo.php


    and this is the code im using to make my custom page

    Code:
    <?php
    error_reporting(E_ALL & ~E_NOTICE & ~8192);
    
    define('XF_ROOT', '/my/path/to/xf'); // set this!
    define('TIMENOW', time());
    define('SESSION_BYPASS', false); // if true: logged in user info and sessions are not needed
    
    require_once(XF_ROOT . '/library/XenForo/Autoloader.php');
    
    XenForo_Autoloader::getInstance()->setupAutoloader(XF_ROOT . '/library');
    
    XenForo_Application::initialize(XF_ROOT . '/library', XF_ROOT);
    XenForo_Application::set('page_start_time', TIMENOW);
    XenForo_Application::disablePhpErrorHandler();
    XenForo_Application::setDebugMode(false);
    
    if (!SESSION_BYPASS)
    {
        XenForo_Session::startPublicSession();
    
        $visitor = XenForo_Visitor::getInstance();
    
        if ($visitor->getUserId())
        {
            $userModel = XenForo_Model::create('XenForo_Model_User');
            $userinfo = $userModel->getFullUserById($visitor->getUserId());
        }
    }
    
    restore_error_handler();
    restore_exception_handler();
    
     

Share This Page