Installation prerequisites

The myDBR installer will guide you through the installation process of the required components. Ensure the following setup for the successful installation of myDBR:

PHP

Ensure that your PHP configuration meets the following requirements. Latest PHP version is recommended. More information on http://www.php.net.

SourceGuardian or ionCube PHP loader

myDBR is a PHP application encoded using either the SourceGuardian or ionCube PHP encoder. To run myDBR, it is essential to have the corresponding SourceGuardian/ionCube PHP loader installed on your system. Select the appropriate loader based on your PHP version, opting for ionCube if your PHP version is <=7.4 and SourceGuardian if it's >=8.0.

When attempting to access myDBR without the required loader installed, the system will prompt you with installation instructions for the loader. Follow these instructions to ensure a smooth myDBR experience.

Once a loader has been installed, you can continue the myDBR install.

SourceGuardian loader

SourceGuardian loaders are available from SourceGuardian's download page.

SourceGuardian offers the Loader Assistant-page that gives you detailed information on which loader to download and how to install it.

Ensure that the xdebug PHP extension is not enabled. If it is enabled, SourceGuardian will produce the following error: "PHP Fatal error: SourceGuardian Loader - For security reasons, this protected script cannot run in the current PHP environment."

ionCube loader

ionCube loaders are available from ionCube's download page.

You can also download the ionCube Loader Wizard-script that gives you detailed information on which loader to download and how to install it.

Database version requirement

MySQL: use database version 5.0.7 or greater. More information on https://www.mysql.com.

MariaDB: all versions are compatible with myDBR.

Microsoft SQL Server: use database version SQL Server 6.5 or greater. More information on https://www.microsoft.com/sql/default.mspx.

Sybase ASE: use database version 15.0.2 or greater. More information on https://www.sybase.com/ase.

SQL Anywhere: use database version 11 or greater. More information on https://www.sybase.com/products/databasemanagement/sqlanywhere.

Choosing the Database Driver

To choose the most suitable PHP database driver, use the following table:

  PHP 5.6 PHP 7.x, 8.x
MySQL mysqli mysqli
Microsoft SQL Server FreeTDS or Microsoft Drivers for PHP for SQL Server Microsoft Drivers for PHP for SQL Server
Sybase ASE FreeTDS PDO_DBLIB
SQL Anywhere FreeTDS FreeTDS

MySQL support: mysqli

For MySQL, PHP must have the mysqli-extension enabled. For information on the installation of the mysqli, see http://www.php.net/mysqli. Most PHP installations have this enabled by default.

Sybase

PHP versions from 7.0 and up, myDBR uses PDO_DBLIB driver. To install the driver, use your OS-supplied package management (for example, Ubuntu's php7.x-sybase). The driver uses FreeTDS so see the FreeTDS configuration below. In PHP versions 5.x, myDBR uses the FreeTDS (mssql) driver.

Microsoft SQL Server with Windows PHP server

For PHP 7.x Microsoft provides Microsoft Drivers for PHP for Microsoft SQL Server at GitHub. See installation instructions on GitHub.

For PHP 5.x you can choose between FreeTDS (php_dblib.dll) and Microsoft Drivers for PHP for SQL Server extension (version 3.2 supports PHP 5.6. Microsoft's extension is referred to as 'sqlsrv' inside myDBR.

Microsoft SQL Server, Sybase ASE and SQL Anywhere support: mssql + FreeTDS

If you are using Microsoft SQL Server (non-MS PHP), Sybase ASE, or SQL Anywhere, a FreeTDS version of mssql PHP extension is used. You can check the phpinfo.php output for the MSSQL Support string. myDBR installation will check that the mssql-extension is installed. Do not use the old deprecated mssql-extension as it is not supported.

Microsoft SQL Server, Sybase ASE, and SQL Anywhere support

myDBR uses PHP's mssql (FreeTDS) extension to access Sybase ASE and SQL Anywhere and Microsoft SQL Server running on PHP 5.6. Usage of FreeTDS is required as with FreeTDS myDBR can use UTF-8 character set. Note that if you are running Microsoft SQL Server and your PHP runs on Windows server, you can also choose to use above mentioned Microsoft PHP Drivers.

FreeTDS configuration (PHP 5.6)

Windows

Use php_dblib.dll instead of php_mssql.dll in the php.ini. php_dblib.dll contains the FreeTDS libraries needed for proper character set (UTF-8) handling. A good source for the Windows php_dblib.dll extension is moodle.org

Other OS

Make sure you have FreeTDS installed and that your PHP installation has mssql-support enabled.

Configuration

To access Microsoft SQL Server, Sybase ASE or SQL Anywhere install FreeTDS libraries. FreeTDS configuration is handled by the freetds.conf-file. You can check the location of the freetds.conf file by issuing the command "tsql -C". If you are accessing only a single database server, you can make the configurations under the [global]. If you plan to use FreeTDS to access multiple database servers, make the specifications under a specific database server section.

SQL Server freetds.conf configuration:

[global]
client charset = UTF-8
text size = 2147483647
tds version = 7.4

The TDS protocol version depends on the SQL Server version you are using:

SQL Server version tds version
Microsoft SQL Server 2000 7.1
Microsoft SQL Server 2005 7.2
Microsoft SQL Server 2008 7.3
Microsoft SQL Server 2012 or 2014 7.4

Sybase ASE and SQL Anywhere freetds.conf configuration:

[global]
port = 5000
client charset = UTF-8
text size = 65536
tds version = 5.0

If you expect to handle longer text or images larger than 2K, change following php.ini-settings:

mssql.textlimit = 2147483647
mssql.textsize = 2147483647

myDBR expects the dates in the form of Y-m-d H:M:S, so check that your FreeTDS's locales.conf contains following setting:

[default]
date format = %Y-%m-%d %H:%M:%S

In order to check the connection and the correct character set, use the tsql command to see what everything is ok. You should be able to connect and see that the used charset is UTF-8 and your dates are correctly formatted (your locale might vary):

$ tsql -Sserver -Uuser -Ppassword
locale is "fi_FI.UTF-8"
locale charset is "UTF-8"
1> select getdate()
2> go

2016-09-30 12:45:10
(1 row affected)
1>