FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Invalid DB type
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Invalid DB type [message #41053 is a reply to message #39598] Tue, 13 May 2008 14:13 Go to previous message
Underhand is currently offline  Underhand   United Kingdom
Messages: 5
Registered: June 2007
Karma:
Junior Member
It is a bug in the installer. If you have only one database type available, it might not correctly be selected. Around line 1070 of install.php as distributed in FUDforum_2-7-7.tar.gz, you can add one line to sort this out.

The reason is the use of current() to choose the database type. The internal pointer into the array might not point to anything useful once elements of the array have been removed. Resetting the internal pointer to the first element of the array ensures that if anything is left in the array, the pointer will point to something valid.

                        foreach ($types as $k => $v) {
                                if (!$module_status[$k]) {
                                        unset($types[$k]);
                                }
                        }

                        reset($types);   // <<<---- Add this line

                        if (count($types) > 1) {
                                draw_row_sel('Database Type','DBTYPE', implode("\n", $types), implode("\n", array_keys($types)), '', (isset($_POST['DBTYPE']) ? $_POST['DBTYPE'] : 'mysql'));
                        } else {
                                echo '<tr bgcolor="#bff8ff"><td valign="top"><b>Database Type</b></td><td><input type="hidden" name="DBTYPE" value="'.key($types).'">Using '.current($types).'</td></tr>';
                        }

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Upgrade Issue: Members List Blank
Next Topic: Lost Files
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 02:42:30 GMT 2024

Total time taken to generate the page: 0.04572 seconds