I'm trying to figure out how to use SQL to calculate distances in a SQLite database.
In MySQL works fine after some configurations needed by Doctrine.
The final SQL uses ASIN and other math functions that I can't use in SQLite.
I've got the library and I could load it using a SQLite client and the query works wihtout problems, so the library is compiled properly.
But i need to load the libray in the actual repository used in symfony.
The last thing I've tryed is this:
$extensionPath = __DIR__ . '/libsqlitefunctions.so';
$con = $this->em->getConnection();
$stm = $con->prepare("SELECT load_extension(?)");
$stm->bindValue(1, $extensionPath);
$stm->execute();
....
The next query execution using QueryBuilder from a doctrine manager that uses this functions
....
And the result is:
SQLSTATE[HY000]: General error: 1 not authorized
The local configuration is, MacOS with PHP 7.1.1
I've read I can't load SQLite extension using PDO, so what alternatives from Doctrine?
Can I load this library permanently on the system?
Thanks!