sruupl / batflat

Lightweight, fast and easy CMS for free. Bootstrap ready. https://batflat.org
MIT License
134 stars 54 forks source link

Error on install - PDOException #30

Closed timplumb closed 5 years ago

timplumb commented 5 years ago

I've been trying to test the free version of batflat today but have struggled to get it working. My development server appears to support the minimum requirements for the CMS but all I'm getting is the following error;

Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 no such table: modules' in /home/site/public_html/batflat/inc/core/lib/QueryBuilder.php:874
Stack trace:
#0 /home/site/public_html/batflat/inc/core/lib/QueryBuilder.php(874): PDO->prepare('SELECT * FROM m...')
#1 /home/site/public_html/batflat/inc/core/lib/QueryBuilder.php(861): Inc\Core\Lib\QueryBuilder->_query('SELECT * FROM m...')
#2 /home/site/public_html/batflat/inc/core/lib/QueryBuilder.php(639): Inc\Core\Lib\QueryBuilder->_build()
#3 /home/site/public_html/batflat/inc/core/lib/ModulesCollection.php(33): Inc\Core\Lib\QueryBuilder->toArray()
#4 /home/site/public_html/batflat/inc/core/Main.php(343): Inc\Core\Lib\ModulesCollection->__construct(Object(Inc\Core\Site))
#5 /home/site/public_html/batflat/inc/core/Site.php(34): Inc\Core\Main->loadModules()
#6 /home/site/public_html/batflat/index.php(28): Inc\Core\Site->__construct()
#7 {main}
  thrown in /home/site/public_html/batflat/inc/core/lib/QueryBuilder.php on line 874

I can see the SQLite database file has been created and looks like it has been populated with the correct default data.

I've successfully managed the install on another server but just not on my main development one.

Any ideas what I'm overlooking? Is there a min_requirements.php file that will check the server for support?

Thanks in advance.

timplumb commented 5 years ago

As a follow up to this it appears that the database.sdb file created on my development server was incomplete. After copying the generated file from my good server to the dev server install the CMS appears to be up and running again.

I did have to change the PHP version on the server so maybe the initial install process failed half way through the process and left me with a corrupt file.