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

Author Message

Gabriel Prager

Monday 17 November 2003 11:43:06 am

Hello,

I tried EzPublish 3.2-3 at home, on the standard version of easy Php (that is on windows). It works perfectly well. Now I'm trying to install it on my host server (on Linux)... and headache.

I do need the assistant. I can not perform the command line steps of the manual installation, since my access to the host server is limited to FTP.

But the assistant stops at the MySQL form. It rejects me, with : "The selected selected user has not got access to any databases".

Indeed, the User name I give HAS access to ONE database. I can check it easily through PhpMyAdmin, and even use it with other PHP programs.

I feel the informations I give to the the EzPublish assistant are OK : server name, MySQL User, and Passwd. Note that if I try to modify them, the answer becomes : "The database would not accept the connection, please review your settings and try again".

It seems that the assistant attempts to CREATE a new database.

The hosting company allows me to create or drop databases, one by one, through a management board, but NOT through MySQL requests.
The hosting company creates artificially a "User" and a "Password" for each database. It grants rghts to this User, only for this Database. Hence, the same User is not allowed to create a new database.

I triend to insist by overriding the site.ini, setu.ini, and so on. Same error message, no matter what.

Well, I need to force the assistant of EzPublish3 to accept an existing database.

Anybody knows how to achieve that ? Thank you in advance

Gab

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:19:07
Script start
Timing: Jan 19 2025 00:19:07
Module start 'layout'
Timing: Jan 19 2025 00:19:07
Module start 'content'
Timing: Jan 19 2025 00:19:07
Module end 'content'
Timing: Jan 19 2025 00:19:07
Script end

Main resources:

Total runtime0.6740 sec
Peak memory usage4,096.0000 KB
Database Queries98

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.3984152.6875
Module start 'layout' 0.00740.0035 741.085939.5234
Module start 'content' 0.01090.6618 780.6094814.1250
Module end 'content' 0.67270.0012 1,594.734428.0781
Script end 0.6739  1,622.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5062160.0002
Check MTime0.00150.2233160.0001
Mysql Total
Database connection0.00090.128810.0009
Mysqli_queries0.569484.4806980.0058
Looping result0.00110.1615960.0000
Template Total0.644095.620.3220
Template load0.00200.296620.0010
Template processing0.642095.253620.3210
Template load and register function0.00040.053810.0004
states
state_id_array0.00030.042110.0003
state_identifier_array0.00120.171420.0006
Override
Cache load0.00200.2971950.0000
Sytem overhead
Fetch class attribute can translate value0.00070.110460.0001
Fetch class attribute name0.00160.2360150.0001
XML
Image XML parsing0.00120.173560.0002
class_abstraction
Instantiating content class attribute0.00000.0056180.0000
General
dbfile0.00070.1063150.0000
String conversion0.00010.008240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
14content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
29content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
15content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 68
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs