Current time: 03-21-2010, 03:07 PM Hello There, Guest! (LoginRegister)


[F] SQLite version [C-StefanT]
06-05-2009, 11:32 AM
Post: #1
[F] SQLite version [C-StefanT]
I just tried to install on SQLite 3.3.7, I had the choice of SQLite 3 on the database details page, but on the table creation page, it said the database engine was SQLite 4. Minor thing but I don't know if it now thinks it's using SQLite 4 or 3.

My Personal Site - Twitter
MyBB Support Team
[Image: lqscs]
Visit this user's website Find all posts by this user
06-05-2009, 12:37 PM
Post: #2
RE: SQLite version
I can reproduce this on the SQLite 3.3.7.

Joshua Mayer
MyBB Support Team
Visit this user's website Find all posts by this user
06-05-2009, 02:41 PM
Post: #3
RE: SQLite version
Just FYI, in ./inc/config.php it says the database type in sqlite3, it's just on the table creation page it shows up as being 4 instead of 3.

My Personal Site - Twitter
MyBB Support Team
[Image: lqscs]
Visit this user's website Find all posts by this user
06-10-2009, 09:08 AM (This post was last modified: 06-10-2009 09:15 AM by Tomm M.)
Post: #4
RE: SQLite version
I'm not 100% on this to be honest, but I think this could be PHP's problem. During the install, the database version isn't set - it's retrieved using ATTR_SERVER_VERSION, which means it's just displaying what your server is telling it too. I think (I can't find it at the minute) there was a bug with this returning incorrect values in some versions of PHP.

Tomm M
MyBB Developer » Marketing Designer & Systems Developer
Find all posts by this user
06-10-2009, 03:21 PM
Post: #5
RE: SQLite version
I believe ATTR_SERVER_VERSION talks about the SQLite API version, not the actual SQlite release version.

If there is a better way we can display the version, then we should use that.

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
06-14-2009, 04:23 PM (This post was last modified: 06-14-2009 04:24 PM by MattRogowski.)
Post: #6
RE: SQLite version
Just noticed the ACP home also says the SQL Engine is SQLite 4.

Just for clarity:
  • I have SQLite 3.3.7
  • The database details page in the installer gives the option of SQLite 3
  • The table creation page says SQLite 4
  • ./inc/config.php says SQLite 3
  • The ACP home page says SQLite 4

My Personal Site - Twitter
MyBB Support Team
[Image: lqscs]
Visit this user's website Find all posts by this user
07-04-2009, 12:07 AM
Post: #7
RE: SQLite version
I believe this is the correct implementation on MyBB's end. Unless there is a "better" way of telling the "version" of SQLite installed, this is currently the best way.

Quote: PDO::ATTR_SERVER_VERSION (integer)
This is a read only attribute; it will return information about the version of the database server to which PDO is connected.
http://php.net/manual/en/pdo.constants.php

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
07-04-2009, 07:41 AM (This post was last modified: 07-04-2009 07:45 AM by frostschutz.)
Post: #8
RE: SQLite version
I haven't looked at the code, but

PHP Code:
php -a
Interactive shell

php 
$pdo = new PDO("sqlite:/tmp/foo.db");
php var_dump($pdo->getAttribute(PDO::ATTR_CLIENT_VERSION));
string(6"3.6.16"
php var_dump($pdo->getAttribute(PDO::ATTR_SERVER_VERSION));
string(6"3.6.16" 

(this result is correct, and I get the same result when putting those lines in a foo.php that I run via the webserver)

But in MyBB install it shows this:

Quote:Table Creation

Connection to the database server and table you specified was successful.

Database Engine: SQLite 4

Huh
Visit this user's website Find all posts by this user
07-04-2009, 03:42 PM
Post: #9
RE: SQLite version
Actually your right - Why is it saying SQLite 4 - that doens't even exist yet. Maybe a typo on my part.

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
07-15-2009, 08:34 AM
Post: #10
[F] SQLite version
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group

Tomm M
MyBB Developer » Marketing Designer & Systems Developer
Find all posts by this user


Forum Jump: