My Joomla website does not run the index.php and instead of displaying the content of the site when accessing the domain, download the index.php file

0

By entering the website I download the index.php instead of showing the content of the site. I am using joomla and this is the content of the index.

<?php

define('JOOMLA_MINIMUM_PHP', '5.3.10');

if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<'))
{
die('Your host needs to use PHP ' . JOOMLA_MINIMUM_PHP . ' or higher to run 
this version of Joomla!');
}

// Saves the start time and memory usage.
$startTime = microtime(1);
$startMem  = memory_get_usage();


define('_JEXEC', 1);

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

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

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

// Set profiler start time and memory usage and mark afterLoad in the 
profiler.
JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, 
$startMem)->mark('afterLoad') : null;

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

// Execute the application.
$app->execute();

?>
    
asked by Ericking Wilches Trujillo 10.12.2017 в 00:04
source

2 answers

1

looks like it's not working php, I would start looking if you load something like ...

Testfile.php

<?php echo "hola";?>

    
answered by 10.12.2017 в 01:11
0

The problem is that you have not correctly configured Apache to use PHP.

If you use Linux and Apache2 you should have the following files in the / etc / apache2 / mods-enabled / directory

  

/etc/apache2/mods-enabled/php5.conf

     

/etc/apache2/mods-enabled/php5.load

    
answered by 11.12.2017 в 10:58