|Title:||Error running fossil-stats-table.php|
|Last Modified:||2018-07-05 19:12:49|
|Version Found In:|
anonymous added on 2018-04-23 11:50:48:
I am trying out the SO theme which looks quite neat. I need to run the fossil-stats-table.php to populate the database. I am just trying out the script as stand-alone on the desktop and have added the full path to my repos by adjusting L28 to $repos = glob("/FULL/PATH/HERE/*.fossil") . I am running into he following error. I am not familiar with PHP but can't see anything obvious wrong with this. Any advice? This is the output I am getting: <pre> < li >Kicad2PK PHP Warning: PDO::query(): SQLSTATE[HY000]: General error: 11 malformed database schema (artifact) - near "(": syntax error in /Users/johnpateman/Desktop/fossil-stats-table.php on line 105 PHP Fatal error: Call to a member function fetchAll() on boolean in /Users/johnpateman/Desktop/fossil-stats-table.php on line 105</pre> Configuration: macOS 10.12.6 / Fossil 2.5 [Built with --with-tcl=1 --with-tcl-private-stubs=1 --with-th1-hooks=1] PHP 5.6.30 (cli) (built: Oct 29 2017 20:30:32) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
anonymous added on 2018-04-23 11:53:26: (text/x-fossil-plain)
[EDIT] I am getting <li>Kicad2PK PHP warning ... (not < >) - just trying to format the tags and pressed submit too soon!
mario added on 2018-05-18 16:49:13: (text/x-fossil-wiki)
Sorry. Didn't see this ticket. Also not sure what is going on there. This looks like a mishap in your Fossils database definition. Try to run the following SQL in your Fossil UI admin interface: SELECT name,value FROM config If it yields the same error, then a DB rebuild might be necessary.
mario added on 2018-05-18 16:49:51: (text/x-fossil-plain)
(Or it could just be your PHP version being linked against a very dated SQLite.)
mario added on 2018-06-04 06:52:55: (text/x-fossil-wiki)
So, this is definitely caused by old SQLite versions. I get the same schema errors when running an old fossil versions against a current database. Only way to fix it is updating pdo/sqlite in PHP.
mario added on 2018-07-05 19:12:49: (text/x-fossil-wiki)
Btw, just ran into the same issue with Fossil-2.7~trunk; which bundles SQLite 3.24.0, but PHP-7.x was bound to SQLite- 3.8.x still. So, other than updating the distros libsqlite, there's no workaround here.