Advertisement:

Author Topic: Installation of SMF 2.0 RC2 fails on PostgreSQL  (Read 1629 times)

Offline k14

  • Newbie
  • *
  • Posts: 3
Installation of SMF 2.0 RC2 fails on PostgreSQL
« on: November 26, 2009, 05:51:28 PM »
SMF Version: 2.0 RC2
PostgreSQL Version: 8.1.18
No mods, no langs, no nothing.

Actually, there were 2 bugs.

First was wrong detection of psql server version.
File: install.php:64
Is: 'utf8_version_check' => '$request = pg_query(\'SELECT version()\'); list ($version) = pg_fetch_row($request); return $version;',
My fix: 'utf8_version_check' => '$request = pg_query(\'SELECT version()\'); list ($version) = pg_fetch_row($request); $version=explode(" ", $version); return $version[1];',

Why? SELECT version() gives 'PostgreSQL 8.1.18 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)', witch was later truncated to 'PostgreSQL 8.1.18 on i486' and compared with '7.4.10'...

Second bug.
File: Sources/Subs-Db-postgresql.php, function smf_db_insert, block method == 'replace'
My fix (additional code on line 636): $entry = array_combine(array_keys($columns), $entry);

Why? $entry has keys (0, 1, 2...) witch don't meet variable names in $updateData nor $where, so smf_db_replacement__callback can't replace them with data.

Sorry, if those bugs have already been described. I haven't spent much time on searching the forum.

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: Installation of SMF 2.0 RC2 fails on PostgreSQL
« Reply #1 on: November 27, 2009, 06:31:19 PM »
Probably similar issue: http://www.simplemachines.org/community/index.php?topic=349375

I will try to check them out as soon as possible, too.
To-do lists are for deferral. The more things you write down the later they're doneā€¦ until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline k14

  • Newbie
  • *
  • Posts: 3

Offline H

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,660
  • Gender: Male
Re: Installation of SMF 2.0 RC2 fails on PostgreSQL
« Reply #3 on: December 02, 2009, 01:46:03 PM »
Marked this as solved, as it is covered in the other topic that Norv has linked to :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)