Matomo install hangs on system install

14 Views Asked by At

I am trying to install Matomo locally, running PHP on IIS. I am able to get to the initial Welcome screen.

enter image description here

Unfortunately, when I try to go to the system check, it fails.

At first, I was getting the error: The mysql driver is not currently installed. I realized at first that I had, in fact, neglected to install MySQL, so I installed MySQL 8.3. That didn't fully resolve the issue either, so based on this Q&A and others, I uncommented a number of extensions:

extension=mysqli
;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client
;extension=oci8_19  ; Use with Oracle Database 19 Instant Client
extension=odbc
;extension=openssl
extension=pdo_firebird
extension=pdo_mysql
extension=pdo_oci
extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
extension=pgsql

Unfortunately, I am now getting a far more generic error that I am unable to understand:

PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\matomo\core\FileIntegrity.php on line 364

Line 364 of FileIntegrity.php is:

} elseif ($hasMd5file && (@md5_file($file) !== $props[1]))

Full method:

protected static function getMessagesFilesMismatch($messages)
{
    $messagesMismatch = array();
    $hasMd5file = function_exists('md5_file');
    $files = \Piwik\Manifest::$files;
    $hasMd5 = function_exists('md5');
    foreach ($files as $path => $props) {
        $file = PIWIK_INCLUDE_PATH . '/' . $path;

        if (!file_exists($file) || !is_readable($file)) {
            $messagesMismatch[] = Piwik::translate('General_ExceptionMissingFile', $file);
        } elseif (filesize($file) != $props[0]) {

            if (self::isModifiedPathValid($path)) {
                continue;
            }

            if (!$hasMd5 || in_array(substr($path, -4), array('.gif', '.ico', '.jpg', '.png', '.swf'))) {
                // files that contain binary data (e.g., images) must match the file size
                $messagesMismatch[] = Piwik::translate('General_ExceptionFilesizeMismatch', array($file, $props[0], filesize($file)));
            } else {
                // convert end-of-line characters and re-test text files
                $content = @file_get_contents($file);
                $content = str_replace("\r\n", "\n", $content);
                if ((strlen($content) != $props[0])
                    || (@md5($content) !== $props[1])
                ) {
                    $messagesMismatch[] = Piwik::translate('General_ExceptionFilesizeMismatch', array($file, $props[0], filesize($file)));
                }
            }
        } elseif ($hasMd5file && (@md5_file($file) !== $props[1])) {
            if (self::isModifiedPathValid($path)) {
                continue;
            }

            $messagesMismatch[] = Piwik::translate('General_ExceptionFileIntegrity', $file);
        }
    }

    if (!$hasMd5file) {
        $messages[] = Piwik::translate('General_WarningFileIntegrityNoMd5file');
    }

    if (!empty($messagesMismatch)) {
        $messages[] = Piwik::translate('General_FileIntegrityWarningReupload');
        $messages[] = '--> ' . Piwik::translate('General_FileIntegrityWarningReuploadBis') . ' <--<br/>';
        $messages = array_merge($messages, $messagesMismatch);
    }

    return $messages;
}

Unfortunately, I don't know PHP well at all, the error message is quite generic, and this isn't even my code base.

Does anyone know how I can get this to work?

Please let me know if I'm missing details, because I'm at a little bit of a loss as to what I should even check here.

0

There are 0 best solutions below