Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8722225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:21:47+00:00 2026-06-13T07:21:47+00:00

I have downloaded a php web application(Studip). When I go to index.php, I get

  • 0

I have downloaded a php web application(Studip). When I go to index.php, I get the following error:


Parse error: syntax error, unexpected end of file in /var/www/html/studip/public/index.php on line 248

I have checked the syntax, there is no syntax error. Is there anything else that causes this error?

Here is the file:

<?php
# Lifter002: TODO
# Lifter007: TODO
# Lifter003: TODO
# Lifter010: TODO
/**
 * index.php - Startseite von Stud.IP (anhaengig vom Status)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * @author      Stefan Suchi <suchi@gmx.de>
 * @author      Ralf Stockmann <rstockm@gwdg.de>
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
 * @category    Stud.IP
 */

require '../lib/bootstrap.php';

unregister_globals();

page_open(array('sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User'));

$auth->login_if(Request::get('again') && ($auth->auth['uid'] == 'nobody'));

// database object
$db=new DB_Seminar;

// evaluate language clicks
// has to be done before seminar_open to get switching back to german (no init of i18n at all))
if (Request::get('set_language')) {
    if(array_key_exists(Request::get('set_language'), $GLOBALS['INSTALLED_LANGUAGES'])) {
        $_SESSION['forced_language'] = Request::get('set_language');
        $_SESSION['_language'] = Request::get('set_language');
    }
}

// store  user-specific language preference
if ($auth->is_authenticated() && $user->id != 'nobody') {
    // store last language click
    if (strlen($_SESSION['forced_language'])) {
        $db->query("UPDATE user_info SET preferred_language = '".$_SESSION['forced_language']."' WHERE user_id='$user->id'");
        $_SESSION['_language'] = $_SESSION['forced_language'];
    }
    $_SESSION['forced_language'] = null;
}

include 'lib/seminar_open.php'; // initialise Stud.IP-Session
require_once 'config.inc.php';
require_once 'lib/functions.php';
require_once 'lib/visual.inc.php';
require_once 'lib/classes/MessageBox.class.php';
include_once 'lib/classes/RSSFeed.class.php';
// -- hier muessen Seiten-Initialisierungen passieren --

// -- wir sind jetzt definitiv in keinem Seminar, also... --
closeObject();

if (get_config('NEWS_RSS_EXPORT_ENABLE') && ($auth->is_authenticated() && $user->id != 'nobody')){
    $rss_id = StudipNews::GetRssIdFromRangeId('studip');
    if ($rss_id) {
        PageLayout::addHeadElement('link', array('rel'   => 'alternate',
                                                 'type'  => 'application/rss+xml',
                                                 'title' => 'RSS',
                                                 'href'  => 'rss.php?id='.$rss_id));
    }
}

PageLayout::setHelpKeyword("Basis.Startseite"); // set keyword for new help
PageLayout::setTitle(_("Startseite"));
Navigation::activateItem('/start');
PageLayout::setTabNavigation(NULL); // disable display of tabs

// Start of Output
include 'lib/include/html_head.inc.php'; // Output of html head
include 'lib/include/header.php';

// only for authenticated users
if ($auth->is_authenticated() && $user->id != 'nobody') {

    UrlHelper::bindLinkParam('index_data', $index_data);

    //Auf und Zuklappen News
    require_once 'lib/showNews.inc.php';
    process_news_commands($index_data);

    // Auf- und Zuklappen Termine
    if (Request::get('dopen')) {
        $index_data['dopen'] = Request::option('dopen');
    }
    if (Request::get('dclose')) {
        unset($index_data['dopen']);
    }

    if ($perm->have_perm('root')) { // root
        $ueberschrift = _("Startseite f�r Root bei Stud.IP");
    } elseif ($perm->have_perm('admin')) { // admin
        $ueberschrift = _("Startseite f�r AdministratorInnen bei Stud.IP");
    } elseif ($perm->have_perm('dozent')) { // dozent
        $ueberschrift = _("Startseite f�r DozentInnen bei Stud.IP");
    } else { // user, autor, tutor
        $ueberschrift = _("Ihre pers�nliche Startseite bei Stud.IP");
    }

    // Warning for Users
    $help_url = format_help_url("Basis.AnmeldungMail");

    // Display banner ad
    if (get_config('BANNER_ADS_ENABLE')) {
        require_once 'lib/banner_show.inc.php';
        banner_show();
    }

    // add skip link
    SkipLinks::addIndex(_("Navigation Startseite"), 'index_navigation');

// display menue
?>
    <div class="index_container">
        <table class="index_box">
            <tr>
                <td class="topic" style="font-weight: bold;" colspan="2">
                    <?= Assets::img('icons/16/white/home.png', array('class' => 'middle')) ?>
                    <?= htmlReady($ueberschrift) ?>
                </td>
            </tr>
            <? if ($perm->get_perm() == 'user') : ?>
            <tr>
                <td class="blank" style="padding: 1em 1em 0em 1em;" colspan="2">
                    <?= MessageBox::info(sprintf(_('Sie haben noch nicht auf Ihre %s Best�tigungsmail %s geantwortet.'), '<a href="'.$help_url.'" target="_blank">', '</a>'),
                            array(_('Bitte holen Sie dies nach, um Stud.IP Funktionen wie das Belegen von Veranstaltungen nutzen zu k�nnen.'),
                                sprintf(_('Bei Problemen wenden Sie sich an: %s'), '<a href="mailto:'.$GLOBALS['UNI_CONTACT'].'">'.$GLOBALS['UNI_CONTACT'].'</a>'))) ?>
                </td>
            </tr>
            <? endif ?>
            <tr>
                <td class="blank" valign="top" style="padding-left:25px; width:80%;" id="index_navigation">
                <? foreach (Navigation::getItem('/start') as $nav) : ?>
                    <? if ($nav->isVisible()) : ?>
                        <div class="mainmenu">
                        <? if (is_internal_url($url = $nav->getURL())) : ?>
                            <a href="<?= URLHelper::getLink($url) ?>">
                        <? else : ?>
                            <a href="<?= htmlspecialchars($url) ?>" target="_blank">
                        <? endif ?>
                        <?= htmlReady($nav->getTitle()) ?></a>
                        <? $pos = 0 ?>
                        <? foreach ($nav as $subnav) : ?>
                            <? if ($subnav->isVisible()) : ?>
                                <font size="-1">
                                <?= $pos++ ? ' / ' : '<br>' ?>
                                <? if (is_internal_url($url = $subnav->getURL())) : ?>
                                    <a href="<?= URLHelper::getLink($url) ?>">
                                <? else : ?>
                                    <a href="<?= htmlspecialchars($url) ?>" target="_blank">
                                <? endif ?>
                                <?= htmlReady($subnav->getTitle()) ?></a>
                                </font>
                            <? endif ?>
                        <? endforeach ?>
                        </div>
                    <? endif ?>
                <? endforeach ?>
                </td>
                <td class="indexpage" align="right" valign="top"><img src="<?=$GLOBALS['ASSETS_URL']?>images/blank.gif" width="390" height="100" alt=""></td>
            </tr>
        </table>
<?

    // display news
    show_news('studip', $perm->have_perm('root'), 0, $index_data['nopen'], "", null, $index_data);

    // display dates
    if (!$perm->have_perm('admin')) { // only dozent, tutor, autor, user
        include 'lib/show_dates.inc.php';
        $start = time();
        $end = $start + 60 * 60 * 24 * 7;
        if (get_config('CALENDAR_ENABLE')) {
            show_all_dates($start, $end, TRUE, FALSE, $index_data['dopen']);
        } else {
            show_dates($start, $end, $index_data['dopen']);
        }
    }

    // display votes
    if (get_config('VOTE_ENABLE')) {
        include 'lib/vote/vote_show.inc.php';
        show_votes('studip', $auth->auth['uid'], $perm);
    }
} else { //displaymodul for nobody
    $index_nobody_template = $GLOBALS['template_factory']->open('index_nobody');
    $db->query("SELECT count(*) from seminare");
    $db->next_record();
    $index_nobody_template->set_attribute('num_active_courses', $db->f(0));
    $db->query("SELECT count(*) from auth_user_md5");
    $db->next_record();
    $index_nobody_template->set_attribute('num_registered_users', $db->f(0));
    $index_nobody_template->set_attribute('num_online_users', get_users_online_count(10));

    if ($_REQUEST['logout'])
    {
        $index_nobody_template->set_attribute('logout', true);
    }

    echo '<div class="index_container" style="width: 750px; margin: 0 auto !important;">';
    echo $index_nobody_template->render();
}

$layout = $GLOBALS['template_factory']->open('shared/index_box');

// Pr�fen, ob PortalPlugins vorhanden sind.
$portalplugins = PluginEngine::getPlugins('PortalPlugin');

foreach ($portalplugins as $portalplugin) {
    $template = $portalplugin->getPortalTemplate();

    if ($template) {
        echo $template->render(NULL, $layout);
        $layout->clear_attributes();
    }
}

page_close();

if (is_object($user) && $user->id != 'nobody') {
    $db->query(sprintf("SELECT * FROM rss_feeds WHERE user_id='%s' AND hidden=0 ORDER BY priority",$auth->auth["uid"]));
    while ($db->next_record()) {
        if ($db->f("name")!="" && $db->f("url")!="") {
            $feed = new RSSFeed($db->f("url"));
            if ($db->f('fetch_title') && $feed->ausgabe->channel['title']) {
                $feedtitle = $feed->ausgabe->channel['title'];
            } else {
                $feedtitle = $db->f("name");
            }

            ob_start();
            $feed->rssfeed_start();
            echo $layout->render(array('title' => $feedtitle, 'icon_url' => 'icons/16/white/rss.png', 'admin_url' => 'edit_about.php?view=rss', 'content_for_layout' => ob_get_clean()));
        }
    }
}

echo '</div>';

include 'lib/include/html_end.inc.php';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:21:48+00:00Added an answer on June 13, 2026 at 7:21 am

    Does your server support short open tags ? Check your ini. If it doesn’t, enable them. If you can’t then replace <? with <?php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded php-sdk for using facebook in php. I also created facebook application
I have an Apache server running which hosts a php web application. This server
I have a web application using PHP and PDO with SQLSRV prepared statements to
I have my javascript in a PHP file with the following code at the
I have a web application, written in PHP, where we have a couple of
We have a web application written in PHP that exports MySQL query results to
I have php running on apache. I have downloaded what I think to be
I am trying to make a Postgres PHP backup script. I have downloaded one
I have developed a small download system in PHP, where files are downloaded through
I have a need to rename a file after download using php cURL. Here's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.