Advertisement:
Anonymous Login
12-05-2016 07:51 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001521SMF 2.0public2009-03-12 14:19
ReporterSleePy 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
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
+Relationships

-Notes

bugnote:0003483

JayBachatero (SMF Friend)

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.

bugnote:0003491

karlbenson (SMF Friend)

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?

bugnote:0003500

SleePy (Developer)

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.

bugnote:0005219

SleePy (Developer)

Last edited: 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 = \'\';

bugnote:0005283

JayBachatero (SMF Friend)

I was working on a fix to actually support this. I can't remember where I saved those files :(.

bugnote:0007526

regularexpression (Viewer)

 ! 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
+Notes
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group