Joomla on different database than MySQL

1,132 views
Skip to first unread message

Antanas Vipartas

unread,
Dec 30, 2011, 4:08:27 AM12/30/11
to joomla-de...@googlegroups.com
Hi, I have found people installed Joomla on MsSQL server http://dotnet.dzone.com/articles/installing-joomla-sql-server

But how do they get that drop down "Database Type" in the 4th step of Joomla intallation, populated with the value "SQL server"?

I plan to write a database driver for Firebird, but doesn't have a clue how to tell Joomla to use that driver? Is it enough to write settings to configuration.php file? thanks

Sid Sudhi

unread,
Dec 30, 2011, 8:48:32 AM12/30/11
to joomla-de...@googlegroups.com
Hi,
If you download the latest and greatest Joomla 2.5 beta - you should be able Joomla on SQLServer out of the box. 

Take a look at

You might want to start looking at the supported databases under platform first. 

Once the db abstraction layer is ready - then simple config change to support fireboard in database.xml in installation/model/forms folder and com_config//model/forms folder would make the new db type appear in the dropdown box during step 4 of Joomla installation and global configuration.

Hope this helps.

sudhi


 


--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/4Ufq55QbG6AJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Antanas Vipartas

unread,
Jan 2, 2012, 7:42:22 AM1/2/12
to joomla-de...@googlegroups.com
sid, thanks for the reply.

Unfortunately, I'm not able to choose SQLserver in that "Database type" select list in Joomla 2.5 beta

Sid Sudhi

unread,
Jan 2, 2012, 7:45:15 AM1/2/12
to joomla-de...@googlegroups.com
Are you on Linux/Mac or Windows? 

On Mon, Jan 2, 2012 at 6:42 AM, Antanas Vipartas <vipan...@gmail.com> wrote:
sid, thanks for the reply.

Unfortunately, I'm not able to choose SQLserver in that "Database type" select list in Joomla 2.5 beta

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/nUfzpQyLbCcJ.

Antanas Vipartas

unread,
Jan 2, 2012, 7:47:31 AM1/2/12
to joomla-de...@googlegroups.com
Windows

Sam Moffatt

unread,
Jan 2, 2012, 4:17:29 PM1/2/12
to joomla-de...@googlegroups.com
Do you have the SQLSRV driver configured and installed in your PHP instance?

Sam Moffatt
http://pasamio.id.au

On Mon, Jan 2, 2012 at 4:47 AM, Antanas Vipartas <vipan...@gmail.com> wrote:
> Windows


>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit

> https://groups.google.com/d/msg/joomla-dev-general/-/bAzAZsW3E4kJ.

elin

unread,
Jan 2, 2012, 4:31:25 PM1/2/12
to joomla-de...@googlegroups.com
The way that field works is that it checks the names of supported types, then cross checks them against the list of drivers. If the driver is there it tries the getConnectors method and lists what is left after that.  So you could debug by going to the field and seeing what is happening at each point and where it is failing for you.

Elin

Sid Sudhi

unread,
Jan 2, 2012, 9:29:09 PM1/2/12
to joomla-de...@googlegroups.com
Rather strange you dont see the SQLSErver in the dropdown list. 
Can you check if the libraries/joomla/database/database folder within Joomla directory structure has sqlsrv.php listed?
Also check datebase.xml within installation/models/forms - if it has SQLSRV as the supported db type.
On the beta release, everything seems to be fine.

For configuring the SQLServer driver  - you need install the PHP drivers for SQLServer. The links below are handy.

Resource for Joomla to run on Windows

1.Web Platform Installer configures SQLServer Compact edition for you

or

1. SQLServer 2008 R2 Express

2. PHP Drivers for SQLServer

3. If SQLServer 2008 (Standard or Enterprise edition) you also need SQL Native client to be installed on the web server.

Note - you can use XAMPP, WAMP or IIS with Fast CGI with PHP 5.3 or later.

If you are on skype - add handle "hooduku". I can try to help you.

On Mon, Jan 2, 2012 at 6:47 AM, Antanas Vipartas <vipan...@gmail.com> wrote:
Windows

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/bAzAZsW3E4kJ.

Antanas Vipartas

unread,
Jan 3, 2012, 3:17:53 AM1/3/12
to joomla-de...@googlegroups.com
Thanks, guys, I didn't have SQLserver driver for PHP installed

Antanas Vipartas

unread,
Jan 17, 2012, 5:48:32 AM1/17/12
to joomla-de...@googlegroups.com
I successfully managed to achieve "Firebird" Database Type appear in the 4th step of Joomla 2.5.0 Beta2 installation, after creating firebird.php, firebirdexporter.php, firebirdimporter.php and firebirdquery.php files in libraries/joomla/database/database folder and added "firebird" value for supported db_type's in database.xml file.

Any help on how could I debug those manually created "firebirdSQL" files would be greatly appreciated

The problem now is that after pressing "Next" button (after filling in the basic database settings) the installer hangs without any errors. Connection to firebird database is successfull, I'm sure about this.

Michael Babker

unread,
Jan 17, 2012, 5:54:06 AM1/17/12
to joomla-de...@googlegroups.com
At step 4, the basic database layout is put in place.  For example, using MySQL, it looks for a file called joomla.sql at installation/sql/mysql/.  So, you'd need a firebird folder and you would need to generate a joomla.sql file to create the tables for the database.

Some sort of error should be getting thrown if the database isn't populated.  Maybe before trying to populate the database, a check needs to be done to ensure that a file exists here?

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/RuHa9mZGEAkJ.

Antanas Vipartas

unread,
Jan 17, 2012, 6:36:19 AM1/17/12
to joomla-de...@googlegroups.com
Thanks, Michael, it really makes sense. I assume, if I install Joomla 2.5 beta2, that I need only "joomla.sql" file (in folder installation/sql/firebird), which creates tables structure?

A check is definitely needed, if the joomla.sql file isn't there. Also it should be great to have some errors, since now I cannot debug anything, even having that file created (maybe that file is incorrect, don't know yet)

El KuKu

unread,
Jan 17, 2012, 6:36:26 AM1/17/12
to joomla-de...@googlegroups.com
You might want to open a firebug console and watch the requests. It could be possible that you receive a notice/warning whatever error that invalidates the JSON response and let's the installer "hang".

That was the case for me when experimenting with my SQLite driver ;)

Antanas Vipartas

unread,
Jan 17, 2012, 7:35:08 AM1/17/12
to joomla-de...@googlegroups.com
Thanks, Firebug shows XHR net requests.

What file "sql/firebird/joomla_backward.sql" is for? I get this file included from database model, but i.e. sqlsrv doesn't have this one

Michael Babker

unread,
Jan 17, 2012, 7:37:30 AM1/17/12
to joomla-de...@googlegroups.com
It's an old file that I don't think is used anymore.

- Michael

Please excuse any errors, this message was sent from my iPhone.

On Jan 17, 2012, at 1:35 PM, Antanas Vipartas <vipan...@gmail.com> wrote:

Thanks, Firebug shows XHR net requests.

What file "sql/firebird/joomla_backward.sql" is for? I get this file included from database model, but i.e. sqlsrv doesn't have this one

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/zbMh41nL_-QJ.

Antanas Vipartas

unread,
Jan 17, 2012, 7:41:55 AM1/17/12
to joomla-de...@googlegroups.com
I get error, that this file was now found. Maybe this is because my main joomla.sql file is empty (I'm testing still Firebird adapter)? And this old file is included from somewhere?

Then next question. If I get error "Some errors occurred while populating the database:" (and no error at the end of the statement) does it mean that tables were not created? Since my joomla.sql file doesn't containt any tables...

I think now I should start migrating all tables structure to Firebird and creating metadata script? Since the adapter is working :)

84.le0n

unread,
Jan 17, 2012, 8:13:08 AM1/17/12
to joomla-de...@googlegroups.com, joomla-de...@googlegroups.com
You've to create joomla.sql and sample_data.sql files and put them inside sql/firebird/ , after that you can do installation.

Eng. Gabriele Pongelli

AVVERTENZE AI SENSI DEL D.LGS. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e negli eventuali files allegati, sono da considerarsi strettamente riservati. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceveste per errore questo messaggio, Vi preghiamo cortesemente di darcene notizia all'indirizzo e-mail di cui sopra e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema; costituisce comportamento contrario ai principi dettati dal D.lgs. 196/2003 il trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse.
This electronic transmission is strictly confidential and intended solely for the addresses. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error, please notify us and delete the received data as soon as possible.

elin

unread,
Jan 17, 2012, 8:20:57 AM1/17/12
to joomla-de...@googlegroups.com
You don't have to have sample_data.sql but you do need joomla.sql.
It's an interesting point about checking for the joomla.sql file. I guess that is how we determine what goes onto the supported list.

Elin

Antanas Vipartas

unread,
Jan 17, 2012, 8:28:42 AM1/17/12
to joomla-de...@googlegroups.com
As I have understood from installation database model, joomla_backward.sql file is referenced instead of joomla.sql, when database does not support utf8. I specially disabled UTF8 support for firebird, because when enabled, first query goes "ALTER DATABASE ... set character set utf8" which firebird doesn't support.

So I created joomla_backwards.sql file, and now database.php function populateDatabase(& $db, $schema) fails when trying to get that file contents (439 line of installation/models/database.php file)...

Sid Sudhi

unread,
Jan 17, 2012, 8:42:04 AM1/17/12
to joomla-de...@googlegroups.com
SQLSrv - was a new intro. and we did not support anything old.
Firebird, ignore everything and just get
joomla.sql/sample_data.sql
If you use firebug and debug the setup.php, database.php and configuration.php files under models, you should be able to get through installation. Focus more on database.php since that is one place you are getting stuck.

If the system hangs during step 4 - what we did was to debug following methods

1. populateDatabase
2. installSampleData

joomla.sql and sample_data.sql should be free from any syntax issues.

Test by replacing #__ in the file, run the sqls to make sure the sql statements are correct.
Please note - insert ignore, replace into and some mysql specific queries just dont work in other databases.
The MySQL specific escape "   `     "  does not work as well.

Good luck.

sudhi

On Tue, Jan 17, 2012 at 6:35 AM, Antanas Vipartas <vipan...@gmail.com> wrote:
Thanks, Firebug shows XHR net requests.

What file "sql/firebird/joomla_backward.sql" is for? I get this file included from database model, but i.e. sqlsrv doesn't have this one

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/zbMh41nL_-QJ.

Antanas Vipartas

unread,
Jan 17, 2012, 11:35:15 AM1/17/12
to joomla-de...@googlegroups.com
Spent many hours debugging and nothing... :(

Seems like joomla.sql file, creating metadata, passes correctly (at the moment it creates only tables #__assets and #__schemas). But later, after the method populateDatabase(), I get error: Table unknown JOS_SCHEMAS At line 1, column 13 in C:\wamp\www\Joomla_2.5.0_Beta2-Full_Package\libraries\joomla\database\database\firebird.php on line 544

I found that JInstallationModelDatabase model in the method initialise() runs this query

$query->insert('#__schemas');
$query->columns(
  array(
    $db->quoteName('extension_id'),
    $db->quoteName('version_id')));
    $query->values('700, '. $db->quote($version)) ;

I use $nameQuote = '"'; in class JDatabaseFirebird which extends JDatabase. It would be great not to use that at all, but it seems, that this is impossible, since leaving it tu empty char causes errors...

Antanas Vipartas

unread,
Jan 17, 2012, 1:14:55 PM1/17/12
to joomla-de...@googlegroups.com
sudhi, what debugging tools did You use?

Also, shouldn't transaction be commited, after the joomla.sql file has been processed? Since installation database model makes explicit inserts/updates... ?

El KuKu

unread,
Jan 18, 2012, 3:42:35 AM1/18/12
to joomla-de...@googlegroups.com
I am currently experimenting with a refactoring of the database part of the installation. The goal is to have a specialized class for every database type, so you can set version checks, encoding and such things.

E.g. this is the MySQL class:
https://github.com/elkuku/joomla-cms/blob/multidb-install/libraries/cms/database/installer/mysql.php
So you may just copy this to a firebird.php and adjust your settings.

If you are interested, the repository is here:
https://github.com/elkuku/joomla-cms/tree/multidb-install

The differences to the current Joomla! master are shown here:
https://github.com/elkuku/joomla-cms/compare/master...multidb-install
Reply all
Reply to author
Forward
0 new messages