Page 1 of 1

Installation stops at checking database

Posted: Sat Dec 24, 2005 4:06 pm
by Graham Fountain
During installation, once I click "complete installation" on either the simple or advanced screen, I get the message "Serendipity Installation checking to see if the database and tables exist".
I am using postgresql for my database. If I drop the database it gives an error message saying the database cannot be found. Likewise if I delete the serendipity user from postgres it does the same, so I know it is correctly finding my server and the database. It is almost as if this page is supposed to refresh after a few seconds or something but it never does. I have tried doing the install with both Firefox and IE and get the same result. I have also fiddled with permissions in the serendipity folder, but it made no difference. Any clues?

Installation stops at checking database

Posted: Sun Dec 25, 2005 10:21 am
by Graham Fountain
A little more information, I found that in the web server's error log it is writing "file does not exist: /[pathname]/serendipity_admin.phpnonexistant". Still haven't solved what is causing it, but it gets me a little closer to possibly what is happening.

Installation stops at checking database

Posted: Sun Dec 25, 2005 11:45 am
by Graham Fountain
Getting Closer to solving this problem - I have put a few echo statements in to debug the problem and have isolated it as follows:
in "postgres.inc.php" at about the 212 Line mark (my line numbers might be slightly different because of the echo statements I added), there is the following statement block -

if (!$expectError && ($reportErr || !$serendipity['production'])) {
$serendipity['dbLastResult'] = pg_query($serendipity['dbConn'], $sql);
} else {
$serendipity['dbLastResult'] = @pg_query($serendipity['dbConn'], $sql);
}

the program is never returning from the "@pg_query" statement. The parameters are as follows -
$serendipity['dbConn'] = 'Resource id #3'
$sql = 'SET default_with_oids = true'

Where it says "Resource id #3' sounds incorrect to me - I suspect that value should be something else.

Is this helping anyone else to solve this problem?

Problem Solved

Posted: Mon Dec 26, 2005 11:36 am
by Graham Fountain
It appears the problem is a bug/incompatibility in PHP 4.1.2 which is what the server was running. The first installation screen indicated that 4.1.2 was ok. After I upgraded to PHP 5.0.5 the problem went away.
This created a new error, saying pg_escape_string wasn't found. I discovered that this function only exists in postgresql 7.2 and greater - this server is running 7.1.3. I replaced the call to pg_escape_string with addslashes() and now all is running sweet.

Re: Problem Solved

Posted: Mon Dec 26, 2005 9:21 pm
by garvinhicking
Sorry that this forum was laggy during christmas. But even great you solved the problem on your own :)

Hope you'll have fun with SErendipty,
Regards,
Garvin