简体   繁体   中英

Joomla index.php BUG

Im a totally newbie in joomla and I inherited a legacy project. The problem is that I copied the project locally on xampp and when i access the site it downloads a file with the content of:

<?php
/**
 * @package     Joomla.Site
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

// Set flag that this is a parent file.
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

if (file_exists(dirname(__FILE__) . '/defines.php')) {
    include_once dirname(__FILE__) . '/defines.php';
}

if (!defined('_JDEFINES')) {
    define('JPATH_BASE', dirname(__FILE__));
    require_once JPATH_BASE.'/includes/defines.php';
}

require_once JPATH_BASE.'/includes/framework.php';

// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;

// Instantiate the application.
$app = JFactory::getApplication('site');

// Initialise the application.
$app->initialise();

// Mark afterIntialise in the profiler.
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;

// Route the application.
$app->route();

// Mark afterRoute in the profiler.
JDEBUG ? $_PROFILER->mark('afterRoute') : null;

// Dispatch the application.
$app->dispatch();

// Mark afterDispatch in the profiler.
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;

// Render the application.
$app->render();

// Mark afterRender in the profiler.
JDEBUG ? $_PROFILER->mark('afterRender') : null;

// Return the response.
echo $app;

and it does not load the content of index page. I have absolutly no idea how to make this works and why it downloads a file always with different name but the same content. This is the online site can anybody help me with this ? thx

see the result here : 在此处输入图片说明

this is the index.html content:

<html xmlns="http://www.w3.org/1999/xhtml">
          <head>
            <title>Transylvania College</title>
            <meta http-equiv="refresh" content="0;URL='http://www.transylvania-college.ro/en'" />
        <script type="text/javascript">

          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-38799767-1']);
          _gaq.push(['_setDomainName', 'transylvania-college.ro']);
          _gaq.push(['_setAllowLinker', true]);
          _gaq.push(['_trackPageview']);

          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();

        </script>
        <script type="text/javascript">
        var fb_param = {};
        fb_param.pixel_id = '6010688839388';
        fb_param.value = '0.00';
        fb_param.currency = 'USD';
        (function(){
          var fpw = document.createElement('script');
          fpw.async = true;
          fpw.src = '//connect.facebook.net/en_US/fp.js';
          var ref = document.getElementsByTagName('script')[0];
          ref.parentNode.insertBefore(fpw, ref);
        })();
        </script>
        <noscript>
          <img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/offsite_event.php?id=6010688839388&amp;value=0&amp;currency=USD" />
        </noscript>
          </head>
          <body>
            <p>Loading...</p>
          </body>
        </html>

In your httpd.conf file (the Apache configuration file), add the following:

AddType  application/x-httpd-php .php

This should solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM