[geeklog-users] Installation error

geeklog-users-admin at lists.geeklog.net geeklog-users-admin at lists.geeklog.net
Fri Aug 1 08:46:23 EDT 2003


Dirk,

	Thank you for your prompt response (and apologies for being so brusque in my 
previous email).

On Fri,  1 Aug 2003 21:43, you wrote:
> >After I click the "Next >>" button on the page entitled "Geeklog Database
> >Settings (Step 2 of 2)", I get a blank page.
>
> Hmm, something's happening there. If you have access to the php.ini, can
> you try changing the error_reporting?

I changed error_reporting, and set error_log to a value, and restarted 
apache, but I can't find any sign of the log file, sorry.

> Or you could try adding some debug output in function
> INST_createDatabaseStructures() in the install script. It does three
> things:
>
> 1. create the tables (seems to do that)
> 2. check which MySQL version you have and add indexes, if possible
> 3. fill the tables

I put an echo statement in each for-loop, plus a few extras to verify some 
values. My new function looks like this:


====================  begin func   ======================

function INST_createDatabaseStructures() {
    global $_CONF, $_DB_dbms, $_TABLES;

    // Because the create table syntax can vary from dbms-to-dbms we are
    // leaving that up to each database driver (e.g. mysql.class.php, 
    // postgresql.class.php, etc)

    // Get DBMS-specific create table array and data array
    require_once($_CONF['path'] . 'sql/' . $_DB_dbms . '_tableanddata.php');

    $progress = '';

    for ($i = 1; $i <= count($_SQL); $i++) {
         echo current($_SQL) . "<br>\n";
        DB_query(current($_SQL));
        next($_SQL);
    }

    echo "MySQL access: " . $_DB_user . "@" . $_DB_host . ":" . $_DB_pass;
    echo "<p>\n";

    if ($_DB_dbms == 'mysql') {
        @mysql_connect ($_DB_host, $_DB_user, $_DB_pass);
        $mysqlv = '';
        $mysqlv = @mysql_get_server_info();
        if (!empty ($mysqlv)) {
            preg_match ('/^([0-9]+).([0-9]+).([0-9]+)/', $mysqlv, $match);
            $mysqlmajorv = $match[1];
            $mysqlminorv = $match[2];
            $mysqlrev = $match[3];
        } else {
            $mysqlmajorv = 0;
            $mysqlminorv = 0;
            $mysqlrev = 0;
        }
        @mysql_close();

         echo "MySQL: " . $mysqlmajorv . "." . $mysqlminorv . "." . $mysqlrev;
         echo "<p>\n";

        if ((($mysqlmajorv == 3) && ($mysqlminorv >= 23) && ($mysqlrev >= 2)) 
||
             ($mysqlmajorv > 3)) {
            // http://www.mysql.com/doc/en/Problems_with_NULL.html
            // Note that you can only add an index on a column that can have
            // NULL values if you are using MySQL Version 3.23.2 or newer
            for ($i = 1; $i <= count ($_INDEX); $i++) {
                 echo current($_INDEX) . "<br>\n";
                DB_query (current ($_INDEX));
                next ($_INDEX);
            }
        }
    }

    // Now insert mandatory data and a small subset of initial data
    for ($i = 1; $i <= count($_DATA); $i++) {
        $progress .= "executing " . current($_DATA) . "<br>\n";
         echo current($_DATA) . "<br>\n";
        DB_query(current($_DATA));
        next($_DATA);
    }

    return true;
}

==================  end func  ============================

The output contains a whole lot of lines beginning with "CREATE TABLE" (which 
I can send you, if you wish), then finally the following line, which I 
presume is significant, since it implies that the mysql_connect( ... )  is 
going to fail?

MySQL access: @:

There is no further output after this.

I have checked my config.php file, and there are values for

$_DB_host, $_DB_name, $_DB_user, $_DB_pass

(The password *did* have punctuation chars in there, but I have changed that 
in both this file, and in MySQL, just in case).

Thanks again for all your time and help so far.

Cheers!
Nik



More information about the geeklog-users mailing list