I'm currently debugging an php-application that depends on a sqlite3
database and is stopped working after upgrading from php-5.3.x
to php-5.4.33
.
This seems to work in both php-versions (so the sqlite3 connection seems to be OK):
$db = new PDO('sqlite:/path/to/the/file.sqlite3');
$result = $db->query('SELECT * FROM DocVerg')->fetchAll();
// outputs the same result in 5.3.x and 5.4.33
print_r($result);
When running the sql below, query()
produces a "Fatal error: Maximum execution time of 60 seconds exceed" under php-5.4.33
and works instantly (without any problem) under php-5.3.x
.
SELECT
COUNT(*)
FROM DocVerg
INNER JOIN Documenten ON DocVerg.dvDocumentID = Documenten.dDocumentID
WHERE NOT(Documenten.dStatus & 752)
AND CAST(strftime('%Y', DocVerg.dvDatum) AS INTEGER) >= 2000
AND CAST(strftime('%Y%m%d', Documenten.dDatum2) AS INTEGER) <= 20150303
AND Documenten.dDatum2 IS NOT NULL
AND Documenten.dTitel LIKE '%raad%'
ORDER BY DocVerg.dvDatum DESC
Some extra info: We're using Sqlite-3.3.6
.
I was struggling with the sql statement a bit but couldn't find out myself what is going wrong here. I'm wondering why this doesn't work anymore under php-5.4
(or higher).