Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => PostgreSQL and SQLite Support => Topic started by: blessid on June 01, 2011, 12:44:15 PM

Title: Problem choosing Database Type!
Post by: blessid on June 01, 2011, 12:44:15 PM
Environment:

Gentoo 10.1 64bit linux
PHP 5.3.6
PostgreSQL 9.0.3
SMF 2.0 RC5


Everything goes smoothly until it needs to connect to the db.
In the install.php script i get to Step 3: Database Settings

It asks for:
Server name
Username
Password
Database name
Table prefix

There is no way to set Database Type: PostgreSQL
(Docs say there should be a dropdown here..?)

If i enter the info and click next i get:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
(Of course, because I'm not using MySQL)..

I tried to edit Settings.php and change $db_type = 'postgresql'; but it automatically changes back to 'mysql' if i run the install.php script again.

Only info i can find says it should be an obvious dropdown, and editing the settings doesn't do anything.  Is PostgreSQL really supported?


-blessid
Title: Re: Problem choosing Database Type!
Post by: SlammedDime on June 01, 2011, 12:54:27 PM
I believe SMF only supports PostgreSQL version 8.
Title: Re: Problem choosing Database Type!
Post by: blessid on June 01, 2011, 01:12:57 PM
I will be happy to downgrade and report my findings, but this recommendation does not address my issue of being unable to choose a Database Type...
Title: Re: Problem choosing Database Type!
Post by: blessid on June 01, 2011, 09:57:11 PM
The downgrade did not, in fact, change my condition of not being able to select PostgreSQL.  For this project i have gone with another forum software, but SMF works well with MySQL and i will continue to enjoy running my other SMF implementations

Thanks for the help regardless

~
Title: Re: Problem choosing Database Type!
Post by: Oldiesmann on June 14, 2011, 01:03:04 AM
Do you have PHP configured with PostgreSQL support? SMF determines whether or not PostgreSQL support is available based on whether or not the pg_connect function exists (and also the PostgreSQL version, but that shouldn't be an issue).

Any version of PostgreSQL 8 or 9 should work fine with SMF.
Title: Re: Problem choosing Database Type!
Post by: yha on May 26, 2013, 11:58:07 AM
I'm having the same issue. PHP *is* configured with PostgreSQL support, but step 2 of the installer doesn't show me an option to choose my DB type at all. If I enter my PostgreSQL database information (username, password, etc), SMF gives me a "Critical Error" with "No such file or directory". I've tried this with both PG 8.x and 9.x. No go.
Title: Re: Problem choosing Database Type!
Post by: Arantor on May 26, 2013, 03:29:57 PM
How do you know it 'is' configured? Does the pg_connect command exist? Considering there are multiple ways it might be configured...
Title: Re: Problem choosing Database Type!
Post by: Oldiesmann on May 27, 2013, 03:26:34 PM
If SMF isn't giving you an option to choose PostgreSQL, then that likely means the actual (native) PostgreSQL extension is not installed/configured. Remember - SMF will not work with PDO.