Page 1 of 1

Cannot login after install

Posted: Mon May 26, 2008 4:06 pm
by karlw
Ok, first time poster.

Some info about my system:

Linux 2.6.22-14-generic, x86_64
Yes, 5.2.3-1ubuntu6.3
PDO::PostgreSQL, PostgreSQL
Serendipity 1.3.1

The installation of Serendipity when well, i got a few warnings, Imagemagick binary was not found, magic_quotes_gpc was on, post_max_size is only 8 MB and upload_max_filesize is only 2 MB, I received no error, so i proceeded with the simple install.

I set up my user name and login to database "blog" and user "blog" in PostgreSQL. The Serendipity installer does not error and says the install is complete. I am able to navigate to the home page and view. When i try an log in it tell me "You appear to have entered an invalid username or password".

Using PhpPgAdmin, I am able to login as "blog", but I cannot create a database, even though I executed the following command in psql:

grant all privileges on database blog to blog;

as a useruser. The permission stick, I can view them in PhpPgAdmin. I went as far as to make this user a superuser and see if it can login, but it cannot. Also, the "blog" database is empty when viewed as a superuser.

I really think this is a permission issue in PostgreSQL, becasue i cannot create a database as "blog", but I assumed that i gave user " blog" access to the database "blog" with the "grant" command above. Any help on this would be great! I would even accept a RTFM, as long as you linked me the the manual.

Best Regards,

-Josh

Re: Cannot login after install

Posted: Mon May 26, 2008 4:18 pm
by garvinhicking
Hi!

This definitely sounds as if your PHP cannot properly connect to the PGSQL server, or only with minimal privileges.

Usually, s9y should emit warning messages as reported by the underlying PHP client API - I don't know why it doesn't in your cases. There should be some kind of a "permission denied" problem.

Can you check your postgresql error log to see if there are any errors? When I tested postgresql, many problems arised due to PHP connecting on the IP instead of locally through a socket (or vice versa).

Sadly the user setup in pgsql is quite complicated (at least to me). Maybe if you try variations of connecting eitther to "127.0.0.1", the real IP adress, "localhost" or an empty host string?

Regards,
Garvin

Posted: Tue May 27, 2008 5:12 am
by karlw
Ok, well i guess my post was a bit premature. I was able to fix my issue by reading through the postgreSQL documentation. The following command needs to be executed in PostgreSQL client (psql for me) as a superuser:

Code: Select all

# CREATE USER blog;
# ALTER USER blog WITH PASSWORD '****';
# CREATE DATABASE blog;
# grant all privileges on database blog to blog; 
# ALTER USER blog CREATEDB;
I did not add 'CREATEDB' privileges to the user.

This was not enough, i then went into my web client (phpPgAdmin) and manually added the database that serendipity needed. I kept this as the default, serendipity. After this, I was able to run the install script, install and login to the serendipity.

Not as painless as i would like, but i learned a little, hope someone gets some help from this.