Forums / Install & configuration / Wizard can't connect to database on my Redhat 9.0 postgresql installation. pgcrypto.sql problem.

Wizard can't connect to database on my Redhat 9.0 postgresql installation. pgcrypto.sql problem.

Author Message

Greg McAvoy-Jensen

Sunday 28 December 2003 1:31:09 am

During the setup process I am returned to the database intialization page with the following error message:

Please make sure that the username and the password is correct. Verify that your PostgreSQL database is configured correctly.
See the PHP documentation for more information about this.
Remember to start postmaster with the -i option.

Perhaps the core of the problem is that when I try to run pgcrypto.sql I get this interaction:

bash-2.05b$ psql -U gregory gregorybooks < /usr/share/pgsql/contrib/pgcrypto.sql
SET
SET
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c
ERROR: permission denied for language c

I actually had success with pgcrypto on the postgresql 7.3 that came with redhat 9, but I installed 7.4 to get the latest and now have this error.

I had followed the instructions on http://ez.no/developer/ez_publish_3/documentation/installation/normal_installation/installing_ez_publish_on_a_windows_based_system
for my postgresql server. To the questions asked about create user (can they make users and databases) I answered yes

On the Site Details page I entered the domain name I use (different from where ezPublish is located). I also changed the title and the database.

Here's the relevant data from my /var/lib/pgsql/data/pg_hba.conf:

# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD

local all all trust
# IPv4-style local connections:
host all all 127.0.0.1 255.255.255.255 crypt
# IPv6-style local connections:
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff crypt

Note also that I had postgresql 7.3 on my Redhat 9, and it's possible I've done something wrong when installing 7.4.

My questions:
1. What do I need to do to get pgcrypto to work?
2. Did I answer the questions regarding create user correctly, or too liberally?
3. Should I have created a password for it? The instructions don't say to.
4. What do I need to do to get a step further in the install process?

Thank you.

Greg

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Greg McAvoy-Jensen

Saturday 03 January 2004 2:29:14 pm

OK, I'll answer my own question. I was unable to get postgresql to work, though I probably could have eventaully (permissions problem?). Instead, I installed mysql, reinstalled apache:

./configure --enable-rewrite=shared --enable-so
make
make install

And I reinstalled php:

rm -rf /usr/local/php
su
cd /home/gregmj/php-4.3-4
./configure --prefix=/usr/local/php --with-config-file-path=/etc/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-track-vars --enable-magic-quotes --enable-debugger --with-mysql --with-mysql-sock=/tmp/mysql.sock
make
make install
cp php.ini-dist /etc/php.ini

There was much more work regarding permissions. It's been too long for me to remember what it was now. I include a script I wrote per the ezPublish installation wizard, to be run in the directory where the ezPublish files are.

#!/bin/bash
# Run this in the root ezpublish directory.
# This fixes permissions needed after you tar the ezpublish file.
# This is the error message it's addressing:
#chmod -R a+rwx settings
#chmod -R a+rwx settings/override
#chmod -R a+rwx var
#chmod -R a+rwx var/storage
#chmod -R a+rwx var/cache
#chmod -R a+rwx settings/siteaccess/admin
#chmod -R a+rwx design

#If you know the user and group of the webserver it's recommended to use a different set of permissions. To do this you need to change all the chmod commands.
#Example

#chmod -R og+rwx var
#chown -R nouser.nouser var

cd /var/www/html/gregorybooks
chmod -R og+rwx settings
chmod -R og+rwx settings/override
chmod -R og+rwx var
chmod -R og+rwx var/storage
chmod -R og+rwx var/cache
chmod -R og+rwx settings/siteaccess/admin
chmod -R og+rwx design

chown -R nobody.nobody settings
chown -R nobody.nobody settings/override
chown -R nobody.nobody var
chown -R nobody.nobody var/storage
chown -R nobody.nobody var/cache
chown -R nobody.nobody settings/siteaccess/admin
chown -R nobody.nobody design
-----------------
It saved met time to have it as a script. I hope this helps someone.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog