User tests: Successful: Unsuccessful:
It would be nice if Joomla! would support the installation on SQLite databases.
This will make the SQLite driver selectable and contains some required modifications.
Note that the installation code has not been touched ('cause it changes oh so quickly
SQLite
in "Database Type"This should be improved in future versions.
Some more information and thinking is in the readme file, some of them have already been implemented in the sqlite branch.
Note If you are using PHP 5.4 you can run the Joomla! CMS with pure PHP - NO HTTP server and NO database server.
$ cd path/to/repo
$ php -S localhost:8000
@mbabker actually I feel kind of froggy about the finder thingy - whatever that means to you
Today I learned, that SQLite does not support:
MD5()
function.SOUNDEX()
function (per default).All of which makes the task of writing the FinderIndexerDriverSqlite
a bit tricky... but not impossible (I hope)..
If somebody with more knowledge than me could jump in here, that would be cool ;)
But thanks for pointing me to those classes. I was not aware of their existence.
You should be able to use the PHP functions for the MD5 and SOUNDEX piece. Performance wise, it won't be the same, but it should do the job at least.
PostgreSQL doesn't support UPDATE JOIN either, but we have a workaround in its query class for that.
Which leaves the last concern, table aliases. That'll be an interesting one to think about.
I'm looking forward, to see this happen.
I've tried to install the current sqlite__clean
branch by downloading the zip and uploading the contents to my server. But couldn't get past the joomla installation. The database configuration page only offers me two options: mysql
and mysqli
.
Then I tried to set $dbtype = 'sqlite'
in the configuration.php
file, where I also set an arbitrary username and password. Now the installation page shows the username and password that I've set, but still no option for sqlite.
Is this a known issue? Is there a workaround?
Edit: I found the problem. Apparently my server PDO only supports SQLite2 while SQLite3 is needed.
On the php info page (phpinfo()
) under PDO drivers
I found that sqlite2
means sqlite2
(obviously), but oddly sqlite
stands for sqlite3
(which is missing in my phpinfo).
I just wrote it down here, in case anybody else has the same issue.
I haven't developed in joomla before. I think I will have a look on how the installation application works and eventually fix the problem.
Thank you for working on this.
Looking forward to this feature.
@pascalfree You mean you solved it ?
I would have guessed that the extension is missing. It should be installed by default since PHP 5, but appearently not every distro follows this...
I recently set up a box with debian stable (PHP 5.4.4) where it was not included, so I had to install it using apt-get install php5-sqlite
- same might go for Ubuntu (not sure).
About sqlite2: I believe it should be supported (but I wouldn't recommend it) - maybe you can try a hack and modify installation/model/forms/database.xml
and add sqlite2
to the list of supported drivers (just a guess)
I just tried, and it still works... just be sure to specify the full path to your database file in the name
field during installation - host
and username
fields are irrelevant !!
The sql file probably needs an update (BTW: it is created using an experimental script xml2sql
Thanks for testing
@elkuku Not exactly solved, but at least I know now, that the problem is not in the software but on the server (once more) ;-)
I contacted my hoster, but they couldn't (or wouldn't) change the configuration.
I then tried to install this on a local server (which uses php5.4 with sqlite3) and it worked. As you said, the full path must be in the name. I guess the readme should be updated on that.
I haven't tested anything past the installation yet.
Also, I tried the hack you suggested. Additionally the following modifications may be needed:
isSupported()
Method check for sqlite2
instead of sqlite
.$this->options['version']=2;
. The PDO class will use it to connect to the database.
It's not working yet, but I will try to fix it. I will post an update if I get it working.Thanks for your help
EDIT: It's not working, but it will install. I did the following modifications (additionally).
driver/sqlite.php
in line 264: The bind was not working (:type
appeared in the query). so I removed it and put $type
directly into the where clauseIF NOT EXISTS
AUTOINCREMENT
This makes it very hard to support sqlite2. I just removed everything unsupported from the sql, to see if I could get at least through the installation process without an error. It worked, but obviously the database can not be set up correctly like that, so I can not login to the admin panel and the front page errors right away. I don't think it's worth the effort to support such old technology, which will hopefully be updated anyway. Ironically, my webserver has sqlite3 installed, but not the corresponding PDO driver.
I just wrote it all down here, so others don't have to walk the same path again. If anybody is interested in actually implementing the sqlite2 support, please let me know. ;-)
@pascalfree Sorry I didn't read your edits - quite interesting, thanks for sharing.
Probably not worth making any effort to support SQLite 2
Status | New | ⇒ | Pending |
Build | ⇒ | . |
Category | ⇒ | SQL |
Unfortunately there has been no reply for over a month. I am going to close this PR. Feel free to create a new PR when ready. Thank you for your contribution.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-02 18:34:08 |
Closed_By | ⇒ | roland-d |
Title |
|
Title |
|
||||||
Labels |
Added:
?
|
Title |
|
it would be great if this could be revived for joomla 4
it would be great if this could be revived for joomla 4
If you're feeling froggy, the Smart Search indexer now uses driver specific classes for the databases. We'll need it sooner or later.