Make rcube_install class PHP4 compatible + add warning for MDB2 on PHP4 + set MDB2 as default
| | |
| | | $rcmail_config['db_dsnr'] = ''; |
| | | |
| | | // database backend to use (only db or mdb2 are supported) |
| | | $rcmail_config['db_backend'] = 'db'; |
| | | $rcmail_config['db_backend'] = 'mdb2'; |
| | | |
| | | // maximum length of a query in bytes |
| | | $rcmail_config['db_max_length'] = 512000; // 500K |
| | |
| | | $value = $this->is_post && (isset($_POST["_$name"]) || $this->config_props[$name]) ? $_POST["_$name"] : $this->config[$name]; |
| | | |
| | | if ($name == 'des_key' && !isset($_REQUEST["_$name"])) |
| | | $value = self::random_key(24); |
| | | $value = rcube_install::random_key(24); |
| | | |
| | | return $value !== null && $value !== '' ? $value : $default; |
| | | } |
| | |
| | | $value = ''; |
| | | } |
| | | else if ($prop == 'default_host' && is_array($value)) { |
| | | $value = self::_clean_array($value); |
| | | $value = rcube_install::_clean_array($value); |
| | | if (count($value) <= 1) |
| | | $value = $value[0]; |
| | | } |
| | |
| | | $RCI->fail('DSN (write)', $db_error_msg); |
| | | echo '<p class="hint">Make sure that the configured database extists and that the user as write privileges<br />'; |
| | | echo 'DSN: ' . $RCI->config['db_dsnw'] . '</p>'; |
| | | if ($RCI->config['db_backend'] == 'mdb2') |
| | | echo '<p class="hint">There are known problems with MDB2 running on PHP 4. Try setting <tt>db_backend</tt> to \'db\' instead</p>'; |
| | | } |
| | | } |
| | | else { |