1<?php
2
3function getSpatialiteExtensionLocation() {
4    $locations = [
5        '/usr/lib/aarch64-linux-gnu/mod_spatialite.so',
6        "/usr/lib/x86_64-linux-gnu/mod_spatialite.so"
7    ];
8
9    foreach ($locations as $location) {
10        if (file_exists($location)) {
11            return $location;
12        }
13    }
14
15    return null;
16}
17