Advertisement:

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001521SMF 2.0public2008-02-08 16:372009-03-12 14:19
ReporterSleePy 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0001521: [POSTGRESQL] Installer can't create the Database
DescriptionUsing the SMF installer it is unable to create a database if it doesn't exist.
Yet using the same exact user I can create it via phpPgAdmin.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003483)
JayBachatero (SMF Friend)
2008-02-09 02:36

This is by design. The installer assumes that the database has been created. Look t install.php 'always_has_db' is set to true for postgre and sqlite. I think that in most live environments you wont be able to create a database like that. The other thing would be the UTF-8 support. You can only enable UTF-8 support in postgre when you create the database.
(0003491)
karlbenson (SMF Friend)
2008-02-09 09:03

On install, there is the line

"If this database does not exist, this installer will try to create it."

maybe that needs altering if your select postgresql or sqlite then?
(0003500)
SleePy (Developer)
2008-02-09 12:57

karl made my point.. the installer say it should, so it either should or shouldn't say
Would be nice for the installer to do this though and save me time during the test installs i do.
(0005219)
SleePy (Developer)
2008-07-29 14:15
edited on: 2008-07-29 14:16

I think this should easily fix it. It adds a language string.

install.language.php
Find:
$txt['db_settings_database_info'] = 'Fill in the name of the database you want to use for SMF to store its data in.
If this database does not exist, this installer will try to create it.';

Replace:
$txt['db_settings_database_info'] = 'Fill in the name of the database you want to use for SMF to store its data in.';
$txt['db_settings_database_info_note'] = 'If this database does not exist, this installer will try to create it.';


install.php:
Find (twice):
                    <div style="font-size: smaller; margin-bottom: 2ex;">', $txt['db_settings_database_info'], '</div>

Replace:
                    <div style="font-size: smaller; margin-bottom: 2ex;">', $txt['db_settings_database_info'], '
<span id="db_name_info_warning">', $txt['db_settings_database_info_note'], '</span></div>

Find:
            document.getElementById(\'db_name_contain\').style.display = showAll ? \'\' : \'none\';
            document.getElementById(\'db_filename_contain\').style.display = !showAll ? \'\' : \'none\';

Add After:
            if (document.getElementById(\'db_type_input\').value == "postgresql")
                document.getElementById(\'db_name_info_warning\').style.display = \'none\';
            else
                document.getElementById(\'db_name_info_warning\').style.display = \'\';

(0005283)
JayBachatero (SMF Friend)
2008-08-02 23:14

I was working on a fix to actually support this. I can't remember where I saved those files :(.
(0007526)
regularexpression (Viewer)
2009-03-12 14:19

 ! We can't create the db for Postgresql, so hide the part which says it does create it (install.php, Install.english.php) Revision 8066
MantisBT 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group