Req #81534 [Com]: Math Functions are not working on SQLITE connection.

From: Date: Thu, 21 Oct 2021 01:36:14 +0000
Subject: Req #81534 [Com]: Math Functions are not working on SQLITE connection.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237306@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81534&edit=1 ID: 81534 Comment by: iyashpal dot dev at gmail dot com Reported by: iyashpal dot dev at gmail dot com Summary: Math Functions are not working on SQLITE connection. Status: Open Type: Feature/Change Request Package: SQLite related Operating System: Windows 11, 10 PHP Version: 8.0.11 Block user comment: N Private report: N New Comment: On a mac, it's working fine without extra effort. On Linux, working smoothly without any extra effort. Previous Comments: ------------------------------------------------------------------------ [2021-10-18 08:13:51] cmb@php.net These functions need to be explicitly enabled when building SQLite3[1], what has not been done so far. Are these usually available on other systems? [1] <https://www.sqlite.org/lang_mathfunc.html> ------------------------------------------------------------------------ [2021-10-18 06:16:45] iyashpal dot dev at gmail dot com PHP files were downloaded from this link : https://windows.php.net/download#php-8.0 I have tested this on Windows 10 Pro and 11 Pro. ------------------------------------------------------------------------ [2021-10-18 06:10:49] iyashpal dot dev at gmail dot com Description: ------------ PHP Version: 8.0.11 OS Edition: Windows 11 Pro OS Version: 21H2 OS Build: 22000.258 PHP Framework Used: Laravel 8.63 Test script: --------------- Route::get('/', function () { $sqlite = new SQLite3(base_path('sqlite3.dbi'), SQLITE3_OPEN_READWRITE); dd($sqlite->query('SELECT SQRT(4)')); dd(DB::select("SELECT SQRT(4)")); return view('welcome'); }); Expected result: ---------------- Should show 2 Actual result: -------------- ErrorException SQLite3::query(): Unable to prepare statement: 1, no such function: SQRT ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81534&edit=1

« previous php.bugs (#237306) next »