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

Home » FUDforum » FUDforum Installation Issues » Invalid DB type
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Invalid DB type [message #39598] Sat, 10 November 2007 10:32 Go to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
I have been trying to install 2.7.7 on an IIS machine running php and mysql.

On the first step of the install progress I get the following problem:
Your WWW_ROOT does not correspond with the SERVER_ROOT path you have specified.


I figure the installer was dumb, and forced it to continue by unchecking the URL check.

MySQL extension reads "enabled".

When I click to the next step, the DBTYPE field only sais "Using" and when I view the page source, it sais the value is "".

MySQL seems to work, I can connect to the database, write to it, and whatnot.

What to do Sir? =)


Re: Invalid DB type [message #39604 is a reply to message #39598] Sun, 11 November 2007 08:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
The first check is fairly simple one it takes your SERVER_ROOT puts a file into it and then tries to access it via WWW_ROOT. If it fails you get an error akin to the one you were seeing.


Do you have mysql or mysqlI <-- extra I at the end extension?


FUDforum Core Developer
Re: Invalid DB type [message #39605 is a reply to message #39598] Sun, 11 November 2007 09:29 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
The following extensions are loaded in php.ini
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll

(Some guy installed the mysqli extension yesterday, was just mysql the other day, I tested the installer today again, still no show,)

PHP runs in ISAPI mode and not CGI mode, if that information can be of any use.

I can connect to the database without any problems using the following script:

<?php
/*
MySQL (Community) Server Installation on 32-bit Windows XP running Apache

On Windows, the recommended way to run MySQL is to install it as  a Windows service, whereby MySQL starts and stops automatically when  Windows starts and stops. A MySQL server installed as a service can  also be controlled from the command line commands, or with the graphical  Services utility like phpMyAdmin.

PHP ---> MySQL CONNECTORS (php_mysql.dll and php_mysqli.dll as extensions)
MySQL provides the mysql and mysqli extensions for the Windows operating  system on http://dev.mysql.com/downloads/connector/php/ for MySQL version 4.1.16 and higher, MySQL 5.0.18, and MySQL 5.1.  As with enabling any PHP extension in php.ini (such as php_mysql.dll),  the PHP directive extension_dir should be set to the directory where  the PHP extensions are located.

MySQL is no longer enabled by default, so the php_mysql.dll DLL must  be enabled inside of php.ini. Also, PHP needs access to the MySQL  client library. A file named libmysql.dll is included in the Windows  PHP distribution and in order for PHP to talk to MySQL this file  needs to be available to the Windows systems PATH.

Following PHP Script is useful to test PHP connection with MySQL.
*/

//$connect = mysql_connect("Your Host Name", "MySQL root directory",  'MySQL password, if any');
//$connect = mysql_connect("Host Name or Address - 127.0.0.1", "root",  'password');
$connect mysql_connect("localhost""root"'password');
if (
$connect){
echo 
"Congratulations!\n<br>";
echo 
"Successfully connected to MySQL database server.\n<br>";
}else{
$error mysql_error();
echo 
"Could not connect to the database. Error = $error.\n<br>";
exit();
}

// Closing connection
$close mysql_close($connect);
if (
$close){
echo 
"\n<br>";
echo 
"Now closing the connection...\n<br>";
echo 
"MySQL connection closed successfully as well.\n<br>";
}else{
echo 
"There's a problem in closing MySQL connection.\n<br>";
}
exit();
?>


[Updated on: Sun, 11 November 2007 09:42]

Report message to a moderator

Re: Invalid DB type [message #39613 is a reply to message #39605] Mon, 12 November 2007 19:16 Go to previous messageGo to next message
Ilia is currently offline  Ilia   
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
What does extension_loaded('mysql') return on your setup?

FUDforum Core Developer
Re: Invalid DB type [message #39618 is a reply to message #39598] Tue, 13 November 2007 03:31 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Installed a virtual machine running apache/mysql instead. Will find out answer for you later though, for the sake of humanity.

Re: Invalid DB type [message #41053 is a reply to message #39598] Tue, 13 May 2008 10:13 Go to previous message
Underhand is currently offline  Underhand   United Kingdom
Messages: 5
Registered: June 2007
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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>';
                        }

Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Upgrade Issue: Members List Blank
Next Topic: Lost Files
Goto Forum:
  

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

Current Time: Mon Jan 22 09:06:21 EST 2018

Total time taken to generate the page: 0.00695 seconds