picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.81k stars 616 forks source link

Pico project throwing an error template. #703

Closed notakoder closed 5 days ago

notakoder commented 1 week ago

I have been using the Pico 3.0 alpha version for PHP 8. 2 and everything was running fine until I recently moved my Pico projects to a new server. Visiting the url displays the following on the browser:

<?php // @codingStandardsIgnoreFile
/**
 * This file is part of Pico. It's copyrighted by the contributors recorded
 * in the version control history of the file, available from the following
 * original location:
 *
 * <https://github.com/picocms/Pico/blob/master/index.php.dist>
 *
 * SPDX-License-Identifier: MIT
 * License-Filename: LICENSE
 */

// check PHP platform requirements
if (PHP_VERSION_ID < 50306) {
    die('Pico requires PHP 5.3.6 or above to run');
}
if (!extension_loaded('dom')) {
    die("Pico requires the PHP extension 'dom' to run");
}
if (!extension_loaded('mbstring')) {
    die("Pico requires the PHP extension 'mbstring' to run");
}

// load dependencies
require_once(__DIR__ . '/vendor/autoload.php');

// instance Pico
$pico = new Pico(
    __DIR__,    // root dir
    'config/',  // config dir
    'plugins/', // plugins dir
    'themes/'   // themes dir
);

// override configuration?
//$pico->setConfig(array());

// run application
echo $pico->run();

I am running Ubuntu 22.04, running PHP 8.2, and have installed php-xml and php-mbstring extensions. Composer is installed in my local system since I install plugins on my local system. Composer isn't installed in the server.

PhrozenByte commented 1 week ago

PHP isn't properly installed or enabled on your webserver. Refer to your admin to get PHP running.

notakoder commented 5 days ago

Ah, thank you.

Apache hadn't enabled PHP because of a conflict with the mpm_event module. Disabled mpm_event and enabled mpm_preform and php8.1 to get the website running.