Installation stops at checking database

Having trouble installing serendipity?
Post Reply
Graham Fountain

Installation stops at checking database

Post 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?
Graham Fountain

Installation stops at checking database

Post 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.
Graham Fountain

Installation stops at checking database

Post 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?
Graham Fountain

Problem Solved

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Problem Solved

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply