Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineCS2

1.4. Installing from scratch with DBAL

Introduction

Installing with DBAL enabled right from the start isn't as easy as it may seem. You need to have two extensions (the DBAL itself and the ADOdb library) installed before even setting up the core system. How this can be done is explained in this section.

Perparing setup

Unpack the TYPO3 source as usual, and unpack a dummy package. Set everything up as explained in the setup documentation, until you come to the point where you are asked to start the install tool – DON'T DO THIS YET!

Install the DBAL and the ADOdb extension in the “typo3conf/ext/” folder. Since you cannot (yet) use the extension manager to install it, you need to fetch the sources from somewhere else, e.g. the CVS on the typo3xdev project on SourceForge.net.

Open the file “localconf.php” and edit it to include the following:

   1: $TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array (

   2:         '_DEFAULT' => array (

   3:             'type' => 'adodb',

   4:             'config' => array(

   5:                 'driver' => 'mysql',

   6:             )

   7:         )

   8:     );   9: 

  10: $TYPO3_CONF_VARS['EXT']['extList'] .= ',adodb,dbal';

Of course you need to adjust the DBAL configuration as you need to, the example above does nothing but route everything through ADOdb inside the DBAL extension. The extList is usually not present at this stage, but we need TYPO3 to know about the DBAL extension being present, obviously. And if the extension list is defined, it must include the other default extensions as well, so we don't override the value (coming from config.default.php), but append to it.

Doing the actual setup

Now fire up a browser and visit your new TYPO3 install – you should get redirected to the install tool in 1-2-3 mode. Fill in the database connection parameters and you should get a list of present databases to choose from (if any exist and are accessible to the user entered). If everything went well up to this point, just continue as usual.

If the 1-2-3 more doesn't work, just go to the regular mode and work your way through the setup.

Try not to create a database from within the install tool, this doesn't work anyway (and it probably never will).