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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 07:25:59
Script start
Timing: Jan 19 2025 07:25:59
Module start 'layout'
Timing: Jan 19 2025 07:25:59
Module start 'content'
Timing: Jan 19 2025 07:25:59
Module end 'content'
Timing: Jan 19 2025 07:25:59
Script end

Main resources:

Total runtime0.7016 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0102 591.0234152.7188
Module start 'layout' 0.01020.0059 743.742239.5859
Module start 'content' 0.01610.6842 783.3281525.2344
Module end 'content' 0.70030.0012 1,308.562516.0156
Script end 0.7016  1,324.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4901160.0002
Check MTime0.00120.1781160.0001
Mysql Total
Database connection0.00150.219310.0015
Mysqli_queries0.630489.8468520.0121
Looping result0.00060.0793500.0000
Template Total0.659794.020.3299
Template load0.00190.267920.0009
Template processing0.657893.758120.3289
Template load and register function0.00010.019410.0001
states
state_id_array0.00110.152110.0011
state_identifier_array0.00170.239720.0008
Override
Cache load0.00180.25741130.0000
Sytem overhead
Fetch class attribute can translate value0.00080.117410.0008
Fetch class attribute name0.00110.154630.0004
XML
Image XML parsing0.00060.081810.0006
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00090.1258180.0000
String conversion0.00000.001940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs