Share » Forums » Install & configuration » Any trick to force the assistant to...

Any trick to force the assistant to accept an existing database ?

Any trick to force the assistant to accept an existing database ?

Monday 17 November 2003 11:43:06 am - 13 replies

Modified on Monday 17 November 2003 11:46:29 am by Gabriel Prager

Author Message

Gabriel Prager

Monday 17 November 2003 12:57:53 pm

Oooops ! I said "assistant", I mean the "wizard"...

Gabriel Prager

Monday 17 November 2003 6:46:47 pm

I found a way to do so... but after wizard completion, It ends up with error Kernel 20.

Thank you to check upper message in the forum. Give me a clue before I drop frozen !!!

Frank Scalzo

Monday 01 March 2004 2:57:55 pm

can you let em know what you did im still fightinh this issue

Kåre Køhler Høvik

Tuesday 02 March 2004 12:00:32 am

Hi

The problem is probably that your hosting provider does not allow listing of databases in MySQL using 'show tables'. This command is being run to check connection, and list databases later in the installation.

This seems to be a somewhat widespread problem, so we'll try to fix it in the next 3.3 release and future 3.4 releases.

In the current 3.3-3 version there is no othersolution than manualy editing :
lib/classes/ezdb/ezmysldb.php
set eZMySQLDB::availableDatabases() to always return false.

--
Kåre Høvik

Kåre Høvik

Kåre Køhler Høvik

Tuesday 02 March 2004 1:56:34 am

I've just rewritten the database list check.
If someone having the problems described above would test the following fix, it sould be of great help.

Replace:
lib/ezdb/classes/ezmysqldb.php eZMySQLDB::availableDatabases(){ ... } with

function availableDatabases()
{
    $databaseArray = mysql_list_dbs( $this->DBConnection );

    if ( $this->errorNumber() != 0 )
    {
        return null;
    }

    $databases = array();
    $i = 0;
    $numRows = mysql_num_rows( $databaseArray );
    while ( $i < $numRows ) {
        $databases[] = mysql_db_name($databaseArray, $i);
        ++$i;
    }
    return $databases;
}

--
Kåre Høvik

Kåre Høvik

Frank Scalzo

Thursday 04 March 2004 1:08:37 pm

changed the code in the 3.3.3 and still no luck still getting

The selected selected user has not got access to any databases. Change user or create a database for the user.
i can login to phpmyadmin just fine so i know i have the access

if you want to use the url and hosting as a test bed lets do it i just need to get this working

kevin wei

Thursday 11 March 2004 9:54:05 pm

can you give a box to let me input the name of my database,i know the name of it,thanks!

Kåre Køhler Høvik

Monday 15 March 2004 3:14:32 am

Hi

Before I commit this patch, could some with the problem please try to see if this fixes anything.

--- lib/ezdb/classes/ezmysqldb.php      (revision 5508)
+++ lib/ezdb/classes/ezmysqldb.php      (working copy)
@@ -624,6 +624,11 @@
         $databases = array();
         $i = 0;
         $numRows = mysql_num_rows( $databaseArray );
+        if ( count( $numRows ) == 0 )
+        {
+            return false;
+        }
+
         while ( $i < $numRows )
         {
             $databases[] = mysql_db_name($databaseArray, $i);

Thanks for the help.

--
Kåre Høvik

Kåre Høvik

Joakim Stai

Tuesday 16 March 2004 4:42:04 am

Kåre,
I tried your fix on my 3.3-1 installation, but it only gave me the error "Internal Server Error, this is an error with your script, check your error log for more information." (in Opera).

if ( count( $numRows ) == 0 )
{
return false;
}

I changed "return false;" to "return null;" and I didn't get this error, but the previously mentioned "The selected selected user has not got access to any databases. Change user or create a database for the user."

What else can I do? I really need to install eZp on this host.

Will the latest release of eZp have a fix for this? I'm going to ask my host to allow "show tables" commands, but I'm not sure if they will do that.

Kåre Køhler Høvik

Tuesday 16 March 2004 5:50:34 am

Hi

try to replace the function availableDatabases() with this :

    function availableDatabases()
    {
        $databaseArray = mysql_list_dbs( $this->DBConnection );

        if ( $this->errorNumber() != 0 )
        {
            return null;
        }

        $databases = array();
        $i = 0;
        $numRows = mysql_num_rows( $databaseArray );
        if ( count( $numRows ) == 0 )
        {
            return false;
        }

        while ( $i < $numRows )
        {
            $databases[] = mysql_db_name($databaseArray, $i);
            ++$i;
        }
        return $databases;
    }

in lib/ezdb/classes/ezmysqldb.php

If does not work try this :

    function availableDatabases()
    {
        return false;
    }

Please let me know what works/does not work

--
Kåre Høvik

Kåre Høvik

Frank Scalzo

Tuesday 23 March 2004 2:38:55 pm

it almost got me there i will try the null i got past the first error picked sites and saw the url paths then it gives error when i want to do 6 types of sites for demo since i wanted an integration of all the site types but i only have one DB

Daniel Teghe

Tuesday 23 March 2004 6:55:54 pm

Hi
I have just experienced similar problems. I couldn't create multiple sites (templates?) when installing and kept sending me back to the db initialization box. In the end I simply proceeded with the 'plain' template, but when I tried to acess both admin and user pages I got a:

kernel (50)
* No database connection could be made, the system might not behave properly.

Don't really know what to do, I spent a long time ftp-ing the files over a dialup modem, and I don't really want to go through re-writing scripts because I don't know much about how to do so.

Cheers,
Daniel

Also:
The user and admin pages come up as my_site/ezP-folder/index.php which is not secure? I did ftp the .htaccess file asd instructed but with no joy

Frank Scalzo

Tuesday 23 March 2004 8:57:14 pm

Hey Daniel

first off make sure your Db is actualy created and named correct and the tables them selves were created if you can not login to sql direct or due to hosting issues try phpmyadmin for sql access via web. as for the mulitple im still waiting for an answer as well

hope that helps

Frank

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu