Hi,
I can't get step_02 to complete successfully while attempting to install MySource Matrix 3.18.0
Error is:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42883]: Undefined function: 7 ERROR: function sq_grant_access("unknown") does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.' in /app/matrix/websites/mysource_matrix/core/lib/DAL/DAL.inc:601
Stack trace:
#0 /app/matrix/websites/mysource_matrix/core/lib/DAL/DAL.inc(601): PDOStatement->execute()
#1 /app/matrix/websites/mysource_matrix/core/lib/db_install/db_install.inc(724): DAL::execPdoQuery(Object(PDOStatement))
#2 /app/matrix/websites/mysource_matrix/install/step_02.php(121): grant_secondary_user_perms()
#3 {main}
thrown in /app/matrix/websites/mysource_matrix/core/lib/DAL/DAL.inc on line 601
--------------------------------------------------------------------------------------------------------------------------------------------------------------
I notice this error has been reported here before. I have tried several times from scratch to do the install
but always get this error. (Drop database and users, recreate DB, remove matrix directory and recreate it etc.)
My db.inc looks like
<?php
$db_conf = array (
'db' => array (
'DSN' => 'pgsql:dbname=mysource_matrix',
'user' => 'matrix',
'password' => '',
'type' => 'pgsql',
),
'db2' => array (
'DSN' => 'pgsql:dbname=mysource_matrix',
'user' => 'matrix',
'password' => '',
'type' => 'pgsql',
),
'db3' => array (
'DSN' => 'pgsql:dbname=mysource_matrix',
'user' => 'matrix_secondary',
'password' => '',
'type' => 'pgsql',
),
'dbcache' => array (
'DSN' => 'pgsql:dbname=mysource_matrix',
'user' => 'matrix',
'password' => '',
'type' => 'pgsql',
),
);
return $db_conf;
?>
My setup looks like:
[matrix@milou mysource_matrix]$ uname -a
Linux milou 2.6.18-92.1.6.el5 #1 SMP Wed Jun 25 13:49:24 EDT 2008 i686 i686 i386 GNU/Linux
[matrix@milou mysource_matrix]$ cat /etc/redhat-release
CentOS release 5.2 (Final)
[matrix@milou mysource_matrix]$ php -version
PHP 5.1.6 (cli) (built: May 24 2008 14:07:53)
Copyright © 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright © 1998-2006 Zend Technologies
[matrix@milou mysource_matrix]$ psql --version
psql (PostgreSQL) 8.1.11
contains support for command-line editing
[matrix@milou mysource_matrix]$ pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
DB 1.7.13 stable
HTTP_Client 1.1.1 stable
HTTP_Request 1.4.2 stable
Image_Canvas 0.3.1 alpha
Image_Color 1.0.2 stable
Image_Graph 0.7.2 alpha
Mail 1.1.14 stable
Mail_Mime 1.5.2 stable
Mail_Queue 1.2.2 stable
Mail_mimeDecode 1.5.0 stable
Net_SMTP 1.3.1 stable
Net_Socket 1.0.8 stable
Net_URL 1.0.15 stable
Numbers_Roman 1.0.2 stable
Numbers_Words 0.15.0 beta
PEAR 1.7.2 stable
Structures_Graph 1.0.2 stable
Text_Diff 1.0.0 stable
XML_HTMLSax 2.1.2 stable
Any help would be appreciated.
Thanks
Tim
XML_Parser 1.2.8 stable
XML_RPC 1.5.0 stable
Download the latest version (v3.18.3) and try again, please.
There were a few bugs in the installation process for 3.18.0.
Hi, Thanks Avi
I would (did) but I'm not running postgres 8.3, Latest version on RHEL /
Centos is 8.1.11. Would you suggest an install of 8.3.x into /usr/local?
You don't need PostgreSQL 8.3 (8.1.11 is fine) to run v3.18.3, however if you *are* running PostgreSQL 8.3 then only v3.18.3 is supported. Hope that makes sense.
Thanks. It does make sense. Just me being a bit dim.
Hi Avi,
Unfortunately I get the same problem with 3.18.3
(Details omitted for brevity):
PGSQL STORED FUNCTIONS CREATED
.
.
.
TABLE CREATION COMPLETE
.
.
.
INDEX CREATION COMPLETE
.
.
.
SEQUENCE CREATION COMPLETE
.
.
.
PGSQL STORED VIEWS CREATED
.
.
.
PGSQL SECONDARY AND TERTIARY USER PERMISSIONS FIXED
------------------------------------
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42883]: Undefined function: 7 ERROR: function sq_grant_access("unknown") does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.' in /app/matrix/websites/mysource_matrix/core/lib/DAL/DAL.inc:601
Stack trace:
#0 /app/matrix/websites/mysource_matrix/core/lib/DAL/DAL.inc(601): PDOStatement->execute()
#1 /app/matrix/websites/mysource_matrix/core/lib/db_install/db_install.inc(724): DAL::execPdoQuery(Object(PDOStatement))
#2 /app/matrix/websites/mysource_matrix/install/step_02.php(121): grant_secondary_user_perms()
#3 {main}
thrown in /app/matrix/websites/mysource_matrix/core/lib/DAL/DAL.inc on line 601
Any ideas?
Thanks.
Did you add the PL/pgSQL language to your database as described in the installation process:
# createlang -U postgres plgpsql matrix
Alternatively, if this is an installation you've already attempted, you need to remove the entire installation directly and drop the database and restart before trying again. The Matrix installation scripts are not very forgiving of errors during the process.
[quote]Did you add the PL/pgSQL language to your database as described in the installation process:
# createlang -U postgres plgpsql matrix
Alternatively, if this is an installation you've already attempted, you need to remove the entire installation directly and drop the database and restart before trying again. The Matrix installation scripts are not very forgiving of errors during the process.[/quote]
Yes I have reinstalled several times by:
1. Dropping database and roles.
2. Restarting postgres
3. Creating database and users and installing language into database.
4. Removing existing mysource installation
5. Unpacking mysource and running step01
6. Editing main and db include files.
7. Running step 2.
The result is always the same with the PDOException.
I'm not sure what to do from here.
[quote]Yes I have reinstalled several times by:
- Dropping database and roles.
- Restarting postgres
- Creating database and users and installing language into database.
- Removing existing mysource installation
- Unpacking mysource and running step01
- Editing main and db include files.
- Running step 2.
The result is always the same with the PDOException.
I'm not sure what to do from here.[/quote]
Have attempted an install on a different platform - Ubuntu 8.04
using postgres 8.3.3 and php 5.2.4 and the result is the same - PDOException.
Below is the output of the step. It is clear that the pgsql stored function
sq_grant_access is created but the PDOException says the function does
not exist. Does anyone have any idea what the problem is?
Thanks
matrix@ubdt804:~/mysource_matrix$ php install/step_02.php `pwd`
----------------------------------
<?php
define('SQ_CONF_PEAR_PATH', SQ_SYSTEM_ROOT.'/php_includes');
$inc_dir = ini_get('include_path');
$inc_dir = (substr($inc_dir, 0, 2) == '.:') ? '.:'.SQ_CONF_PEAR_PATH.':'.substr($inc_dir, 2) : SQ_CONF_PEAR_PATH.':'.$inc_dir;
ini_set('include_path', $inc_dir);
define('SQ_CONF_BACKEND_SUFFIX', '_admin');
define('SQ_CONF_LIMBO_SUFFIX', '_edit');
define('SQ_CONF_LOGIN_SUFFIX', '_login');
define('SQ_CONF_NOCACHE_SUFFIX', '_nocache');
define('SQ_CONF_RECACHE_SUFFIX', '_recache');
define('SQ_CONF_ASSET_TREE_BASE', 64);
define('SQ_CONF_ASSET_TREE_SIZE', 4);
define('SQ_CONF_ASSET_CACHE_SIZE_WEB', -1);
define('SQ_CONF_ASSET_CACHE_SIZE_CLI', -1);
define('SQ_CONF_ROLLBACK_ENABLED', '0');
define('SQ_CONF_DEBUG', 0);
define('SQ_CONF_SYSTEM_NAME', 'The System');
define('SQ_CONF_SYSTEM_OWNER', '');
define('SQ_CONF_SYSTEM_ROOT_URLS', 'ubdt804.xxx.xxx.xxx.au');
define('SQ_CONF_SYSTEM_PARENT_DOMAINS', '');
define('SQ_CONF_STATIC_ROOT_URL', '');
define('SQ_CONF_WEB_PATH_SEPARATOR', '-');
define('SQ_CONF_STATIC_ROOT_HTTP', true);
define('SQ_CONF_STATIC_ROOT_HTTPS', false);
define('SQ_CONF_DEFAULT_EMAIL', 'Tim.Hespe@servicefirst.xxx.xxx.au');
define('SQ_CONF_TECH_EMAIL', 'Tim.Hespe@servicefirst.xxx.xxx.au');
define('SQ_CONF_MAX_LOGIN_ATTEMPTS', 3);
define('SQ_CONF_REFRESH_INTERVAL', 120);
define('SQ_CONF_LOCK_LENGTH', 600);
define('SQ_CONF_ASSET_MAP_ASSET_LIMIT', 50);
define('SQ_CONF_ASSET_MAP_ASSET_DISPLAY_NAME', '%asset_short_name%');
define('SQ_CONF_SEND_CACHEABLE_HEADER', '0');
define('SQ_CONF_SEND_LAST_MODIFIED_HEADER', '0');
define('SQ_CONF_SEND_NOT_MODIFIED_HEADER', '0');
define('SQ_CONF_SEND_NO_CACHE_HEADER', '0');
define('SQ_CONF_SEND_404_CACHEABLE_HEADER', '0');
define('SQ_CONF_ERRORS_HIDE_FRONTEND', false);
define('SQ_CONF_DEFAULT_FRONTEND_LANGUAGE', 'en');
define('SQ_CONF_DEFAULT_BACKEND_LOCALE', 'en_AU');
define('SQ_CONF_DEFAULT_CHARACTER_SET', 'iso-8859-1');
define('SQ_CONF_ALLOW_IP_CHANGE', '0');
define('SQ_CONF_ALLOW_HTTP_LOGIN', '0');
define('SQ_CONF_ENABLE_HTTP_LOGIN', '0');
define('SQ_CONF_ENABLE_EXTERNAL_AUTH_SYSTEMS', true);
define('SQ_CONF_HTTP_LOGIN_VAR', 'REMOTE_USER');
define('SQ_CONF_ACCEPT_HTTP_CREDS', '0');
define('SQ_CONF_COMMIT_BUTTON_TEXT', 'Commit');
define('SQ_CONF_CONFIRM_SAVE_CHANGES', '1');
define('SQ_CONF_LOG_EXTENSION', '.log');
define('SQ_CONF_LOG_FILE_SYSTEM', 'system');
define('SQ_CONF_LOG_FILE_ERROR', 'error');
ini_set('error_log', SQ_LOG_PATH.'/'.SQ_CONF_LOG_FILE_ERROR.SQ_CONF_LOG_EXTENSION);
define('SQ_CONF_LOG_ERRORS', true);
ini_set('log_errors', '1');
define('SQ_CONF_SESSION_GC_MAXLIFETIME', 604800);
ini_set('session.gc_maxlifetime', 604800);
define('SQ_CONF_EDITING_TIME', 3600);
define('SQ_CONF_NUM_DATA_DIRS', 20);
define('SQ_CONF_FORCE_SECURE_LOGIN_URLS', '');
define('SQ_CONF_WEB_MEMORY_LIMIT', 16);
define('SQ_CONF_CRON_MEMORY_LIMIT', 16);
define('SQ_CONF_USE_DEFAULT_SESSION_SAVE_PATH', false);
define('SQ_CONF_ENABLE_ROLES_SYSTEM', true);
define('SQ_CONF_ENABLE_GLOBAL_ROLES', true);
define('SQ_CONF_TIMEZONE', 'Australia/Sydney');
?>
----------------------------------
------------------------------------
PGSQL STORED FUNCTIONS CREATED
sq_grant_access Function
sq_set_rollback_timestamp(TIMESTAMP) Function
sq_set_rollback_timestamp Function
sq_get_rollback_timestamp Function
sq_get_lineage_from_url Function
sq_get_parent_treeids(VARCHAR, INT, TIMESTAMP) Function
sq_get_parent_treeids(VARCHAR, INT) Function
sq_rb_get_parent_treeids(VARCHAR, INT) Function
sq_get_lineage_treeids(VARCHAR, INT, TIMESTAMP) Function
sq_get_lineage_treeids(VARCHAR, INT) Function
sq_rb_get_lineage_treeids(VARCHAR, INT) Function
atoi Function
asset_link_treeid_convert Function
------------------------------------
------------------------------------
TABLE CREATION COMPLETE
New Tables:
sq_pkg
sq_ast
sq_rb_ast
sq_ast_lnk
sq_rb_ast_lnk
sq_shdw_ast_lnk
sq_rb_shdw_ast_lnk
sq_ast_lnk_tree
sq_rb_ast_lnk_tree
sq_ast_typ
sq_ast_attr
sq_ast_attr_val
sq_rb_ast_attr_val
sq_ast_attr_uniq_val
sq_rb_ast_attr_uniq_val
sq_ast_typ_inhd
sq_ast_url
sq_rb_ast_url
sq_ast_path
sq_rb_ast_path
sq_ast_lookup
sq_rb_ast_lookup
sq_ast_lookup_value
sq_rb_ast_lookup_value
sq_ast_lookup_remap
sq_rb_ast_lookup_remap
sq_ast_perm
sq_rb_ast_perm
sq_ast_edit_access
sq_rb_ast_edit_access
sq_ast_mdata
sq_rb_ast_mdata
sq_ast_mdata_val
sq_rb_ast_mdata_val
sq_ast_mdata_dflt_val
sq_rb_ast_mdata_dflt_val
sq_ast_wflow
sq_rb_ast_wflow
sq_internal_msg
sq_hipo_job
sq_lock
sq_patches
sq_trig
sq_rb_trig
sq_trig_hash
sq_file_vers_file
sq_file_vers_history
sq_file_vers_lock
sq_thes_term
sq_thes_term_note
sq_thes_rel
sq_thes_lnk
sq_ast_role
sq_rb_ast_role
sq_cache
------------------------------------
------------------------------------
INDEX CREATION COMPLETE
New Indexes:
sq_ast_type_code
sq_rb_ast_type_code
sq_ast_name
sq_rb_ast_name
sq_ast_created
sq_rb_ast_created
sq_ast_updated
sq_rb_ast_updated
sq_ast_published
sq_rb_ast_published
sq_rb_ast_assetid
sq_rb_ast_effrm
sq_rb_ast_efto
sq_ast_lnk_majorid
sq_rb_ast_lnk_majorid
sq_ast_lnk_minorid
sq_rb_ast_lnk_minorid
sq_ast_lnk_link_type
sq_rb_ast_lnk_link_type
sq_ast_lnk_is_dependant
sq_rb_ast_lnk_is_dependant
sq_rb_ast_lnk_linkid
sq_rb_ast_lnk_value
sq_rb_ast_lnk_effrm
sq_rb_ast_lnk_efto
sq_shdw_ast_lnk_majorid
sq_rb_shdw_ast_lnk_majorid
sq_shdw_ast_lnk_minorid
sq_rb_shdw_ast_lnk_minorid
sq_shdw_ast_lnk_link_type
sq_rb_shdw_ast_lnk_link_type
sq_rb_shdw_ast_lnk_linkid
sq_rb_shdw_ast_lnk_effrm
sq_rb_shdw_ast_lnk_efto
sq_ast_lnk_tree_linkid
sq_rb_ast_lnk_tree_linkid
sq_rb_ast_lnk_tree_treeid
sq_rb_ast_lnk_tree_effrm
sq_rb_ast_lnk_tree_efto
sq_ast_typ_lvl
sq_ast_attr_type_code
sq_ast_attr_name
sq_ast_attr_val_attrid
sq_rb_ast_attr_val_attrid
sq_ast_attr_val_assetid
sq_rb_ast_attr_val_assetid
sq_ast_attr_val_concat
sq_rb_ast_attr_val_concat
sq_rb_ast_attr_val_effrm
sq_rb_ast_attr_val_efto
sq_rb_ast_attr_uniq_val_owning_attrid
sq_rb_ast_attr_uniq_val_custom_val
sq_rb_ast_attr_uniq_val_effrm
sq_rb_ast_attr_uniq_val_efto
sq_ast_typ_inhd_inhd_type_code
sq_ast_typ_inhd_type_code
sq_ast_url_assetid
sq_rb_ast_url_assetid
sq_rb_ast_url_urlid
sq_rb_ast_url_url
sq_rb_ast_url_effrm
sq_rb_ast_url_efto
sq_ast_path_assetid
sq_rb_ast_path_assetid
sq_rb_ast_path_path
sq_rb_ast_path_effrm
sq_rb_ast_path_efto
sq_ast_lookup_assetid
sq_rb_ast_lookup_assetid
sq_rb_ast_lookup_url
sq_rb_ast_lookup_effrm
sq_rb_ast_lookup_efto
sq_ast_lookup_value_value
sq_rb_ast_lookup_value_value
sq_ast_lookup_value_depth
sq_rb_ast_lookup_value_depth
sq_rb_ast_lookup_value_url
sq_rb_ast_lookup_value_name
sq_rb_ast_lookup_value_effrm
sq_rb_ast_lookup_value_efto
sq_rb_ast_lookup_remap_url
sq_rb_ast_lookup_remap_effrm
sq_rb_ast_lookup_remap_efto
sq_ast_perm_assetid
sq_rb_ast_perm_assetid
sq_ast_perm_userid
sq_rb_ast_perm_userid
sq_rb_ast_perm_permission
sq_rb_ast_perm_effrm
sq_rb_ast_perm_efto
sq_rb_ast_edit_access_userid
sq_rb_ast_edit_access_type_code
sq_rb_ast_edit_access_screen
sq_rb_ast_edit_access_section
sq_rb_ast_edit_access_effrm
sq_rb_ast_edit_access_efto
sq_rb_ast_mdata_assetid
sq_rb_ast_mdata_schemaid
sq_rb_ast_mdata_effrm
sq_rb_ast_mdata_efto
sq_rb_ast_mdata_val_assetid
sq_rb_ast_mdata_val_fieldid
sq_rb_ast_mdata_val_effrm
sq_rb_ast_mdata_val_efto
sq_rb_ast_mdata_dflt_val_assetid
sq_rb_ast_mdata_dflt_val_effrm
sq_rb_ast_mdata_dflt_val_efto
sq_rb_ast_wflow_assetid
sq_rb_ast_wflow_schemaid
sq_rb_ast_wflow_effrm
sq_rb_ast_wflow_efto
sq_internal_msg_userto
sq_internal_msg_type
sq_internal_msg_to_and_type
sq_lock_source_lockid
sq_trig_active
sq_rb_trig_active
sq_rb_trig_id
sq_rb_trig_effrm
sq_rb_trig_efto
sq_trig_hash_event
sq_trig_hash_assetid
sq_trig_hash_asset_type
sq_trig_hash_treeid
sq_trig_hash_tree_propagate
sq_trig_hash_triggerid
sq_trig_hash_parentid
sq_trig_hash_parent_type
sq_trig_hash_childid
sq_trig_hash_child_type
sq_file_vers_history_from_date
sq_file_vers_history_to_date
sq_thes_term_thesid
sq_thes_term_note_termid
sq_thes_term_note_name
sq_thes_term_note_thesid
sq_thes_rel_thesid
sq_thes_lnk_major
sq_thes_lnk_minor
sq_thes_lnk_relid
sq_thes_lnk_thesid
sq_rb_ast_role_roleid
sq_rb_ast_role_assetid
sq_rb_ast_role_userid
sq_rb_ast_role_effrm
sq_rb_ast_role_efto
sq_cache_assetid
sq_cache_expires
------------------------------------
------------------------------------
SEQUENCE CREATION COMPLETE
------------------------------------
------------------------------------
PGSQL STORED VIEWS CREATED
sq_vw_ast_lnk_minor View
sq_vw_ast_lnk_major View
sq_vw_ast_lnk_minor Rollback View
sq_vw_ast_lnk_major Rollback View
sq_vw_ast_role View
sq_vw_ast_perm View
sq_vw_ast_role Rollback View
sq_vw_ast_perm Rollback View
------------------------------------
------------------------------------
PGSQL SECONDARY AND TERTIARY USER PERMISSIONS FIXED
------------------------------------
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42883]: Undefined function: 7 ERROR: function sq_grant_access(unknown) does not exist
LINE 1: SELECT sq_grant_access($1)
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.' in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc:601
Stack trace:
#0 /home/websites/mysource_matrix/core/lib/DAL/DAL.inc(601): PDOStatement->execute()
#1 /home/websites/mysource_matrix/core/lib/db_install/db_install.inc(724): DAL::execPdoQuery(Object(PDOStatement))
#2 /home/websites/mysource_matrix/install/step_02.php(121): grant_secondary_user_perms()
#3 {main}
thrown in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc on line 601
[quote]Yes I have reinstalled several times by:
- Dropping database and roles.
- Restarting postgres
- Creating database and users and installing language into database.
- Removing existing mysource installation
- Unpacking mysource and running step01
- Editing main and db include files.
- Running step 2.
The result is always the same with the PDOException.
I'm not sure what to do from here.[/quote]
What give you this commands (on Centos):
rpm -qa | grep -i php | grep -i -e pdo -e pgsql
I have on test machine:
php-pdo-5.1.6-20.el5
php-pgsql-5.1.6-20.el5
Also what give you:
php -i | grep pdo
Do you have something like:
$Id: pdo_pgsql
?
Regards
Arek
[quote]What give you this commands (on Centos):
rpm -qa | grep -i php | grep -i -e pdo -e pgsql
I have on test machine:
php-pdo-5.1.6-20.el5
php-pgsql-5.1.6-20.el5
Also what give you:
php -i | grep pdo
Do you have something like:
$Id: pdo_pgsql
?
Regards
Arek[/quote]
rpm -qa | grep -i php | grep -i -e pdo -e pgsql
php-pdo-5.1.6-20.el5
php-pgsql-5.1.6-20.el5
Not the problem.
After much testing I've been able to track down the problem
to the granting of permissions to the cache user in
function grant_secondary_user_perms
in file
core/lib/db_install/db_install.inc
For some reason it doesn't like the dbcache entry below:
<?php
$db_conf = array (
'db' => array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix',
'password' => '',
'type' => 'pgsql',
),
'db2' => array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix',
'password' => '',
'type' => 'pgsql',
),
'db3' => array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix_secondary',
'password' => '',
'type' => 'pgsql',
),
'dbcache' => array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix',
'password' => '',
'type' => 'pgsql',
),
);
return $db_conf;
?>
If I set
'dbcache` => NULL,
it works. Is there something wrong with the dbcache entry?
[quote]If I set
'dbcache` => NULL,
it works. Is there something wrong with the dbcache entry?[/quote]
Having dbcache as NULL is fine for a non-replicated server, btw. Not sure what's wrong with your entry though.