Database Installation Troubles

Greetings;


I'm attempting to install the CMS on FreeBSD 4.10-RELEASE-p14, PHP 4.3.11, and Postgres 8.0.3.



I've created the DB "matrix", and added plsql with createlang.



During the install, all steps appear to be going fine, until creation of the database (install/step_02.php . ), which ends in:



[05-Aug-2005 15:02:27] Fri 05/08/2005 15:02:27 [mysource warning] (/core/lib/db_install/db_install.inc:382) - DB Error: unknown error

SELECT sq_grant_access(FALSE) [nativecode=ERROR: function sq_grant_access(boolean) does not exist



I've been looking for the schema, or SQL that creates the tables/views/procedures to see if I could hunt it down, with no luck.



Any ideas how this can be corrected / what I'm doing incorrectly?

I suppose a version would be helpful? <G>


I'm currently trying 3.4.4.



Cheers!

Sean.

The sq_grant_access function is installed during step_02.php. If you didint get any other errors reported during that step, you may want to try dropping the DB and starting again to see if it goes in this time. If you try this, you dont have to run step_01.php again - just start from step_02.php.


If that doesnt work, I'll post the SQL that creates that function and you can give that a go directly to see if there are any hidden problems.

Hi Greg;


The error posted above from the log file is echoed during execution of step_02.php, I've never gotten to step_03.php before :frowning:



Strangely enough, the very first time I ran step_02.php, it reported success. However, on entering the database only 6 sequences existed - no tables, views, proceedures, etc…



I've since dropped the database and attempted to recreate many times, fiddling with the source. I'm now back to clean downloaded code, and a new database.



Thanks for your attention.

I'm looking forward to the test drive!



Cheers,

Sean.


[quote]The sq_grant_access function is installed during step_02.php. If you didint get any other errors reported during that step, you may want to try dropping the DB and starting again to see if it goes in this time. If you try this, you dont have to run step_01.php again - just start from step_02.php.



If that doesnt work, I’ll post the SQL that creates that function and you can give that a go directly to see if there are any hidden problems.

[right][post=“6360”]<{POST_SNAPBACK}>[/post][/right][/quote]

Because step_02 caches some things to file system (and initialises the file repository), if it fails you need to undo these things. Normally the easiest way to do that is to completely delete and re unzip matrix.

[quote]Because step_02 caches some things to file system (and initialises the file repository), if it fails you need to undo these things. Normally the easiest way to do that is to completely delete and re unzip matrix.
[right][post=“6414”]<{POST_SNAPBACK}>[/post][/right][/quote]



Hi Marcus;



From freshly unpacked source of file mysource_matrix_3-4-4.tar.gz, the output of

% php install/step_02.php . (after running install/step_01.php . of course)



is as follows:



% php install/step_02.php .

----------------------------------

<?php

define(‘SQ_CONF_DB_DSN’, ‘pgsql://csmason:<passwd>@localhost/matrix’);

define(‘SQ_CONF_DB2_DSN’, ‘’);

define(‘SQ_CONF_PEAR_PATH’, ‘/usr/home/csmason/work/cms/matrix/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_ASSET_TREE_BASE’, 36);

define(‘SQ_CONF_ASSET_TREE_SIZE’, 4);

define(‘SQ_CONF_ROLLBACK_ENABLED’, ‘1’);

define(‘SQ_CONF_DEBUG’, 0);

define(‘SQ_CONF_SYSTEM_NAME’, ‘The System’);

define(‘SQ_CONF_SYSTEM_OWNER’, ‘’);

define(‘SQ_CONF_SYSTEM_ROOT_URLS’, ‘www.example.com’);

define(‘SQ_CONF_DEFAULT_EMAIL’, ‘matrix-team@squiz.net’);

define(‘SQ_CONF_TECH_EMAIL’, ‘matrix-team@squiz.net’);

define(‘SQ_CONF_MAX_LOGIN_ATTEMPTS’, 3);

define(‘SQ_CONF_MAX_IDLE_TIME’, 6000);

define(‘SQ_CONF_REFRESH_INTERVAL’, 120);

define(‘SQ_CONF_LOCK_LENGTH’, 600);

define(‘SQ_CONF_LOG_FILE’, ‘’);

ini_set(‘error_log’, SQ_DATA_PATH.’/private/logs/error.log’);

define(‘SQ_CONF_LOG_ERRORS’, true);

ini_set(‘log_errors’, ‘1’);

define(‘SQ_CONF_ERRORS_HIDE_FRONTEND’, false);

define(‘SQ_CONF_DEFAULT_FRONTEND_LANGUAGE’, ‘en’);

define(‘SQ_CONF_DEFAULT_CHARACTER_SET’, ‘iso-8859-1’);

define(‘SQ_CONF_ALLOW_IP_CHANGE’, ‘0’);

define(‘SQ_CONF_COMMIT_BUTTON_TEXT’, ‘Commit’);

?>

----------------------------------



------------------------------------

TABLE CREATION COMPLETE

------------------------------------



------------------------------------

SEQUENCE CREATION COMPLETE

------------------------------------



------------------------------------

PGSQL GRANT ACCESS FUNCTION CREATED

------------------------------------

±--------------------------------------------------------------------------------------------------------+

| MySource Warning |

|---------------------------------------------------------------------------------------------------------|

| DB Error: unknown error |

| SELECT sq_grant_access(FALSE) [nativecode=ERROR: function sq_grant_access(boolean) does not exist |

| HINT: No function matches the given name and argument types. You may need to add explicit type casts.] |

±--------------------------------------------------------------------------------------------------------+

±-----------------------------------------+

| MySource Error |

|------------------------------------------|

| TABLE INSTALL FAILURE |

±-----------------------------------------+

[quote]define(‘SQ_CONF_DB_DSN’, ‘pgsql://csmason:<passwd>@localhost/matrix’);
define(‘SQ_CONF_DB2_DSN’, ‘’);

[right][post=“6429”]<{POST_SNAPBACK}>[/post][/right][/quote]



Here’s your problem. You must configure both DSN and DSN2, even if they’re identical. We usually use two different database users (one for web access and one for batch processing). The database is trying to apply permissions to the second user, but its not specified, so it breaks.



Though, we should probably test if DSN2 is configured and if not, just default to DSN instead.

Geeezz…


As per usual, things work much better when I follow the instructions…

Your help is much appreciated!



Cheers,

Sean.


[quote]Here’s your problem. You must configure both DSN and DSN2, even if they’re identical. We usually use two different database users (one for web access and one for batch processing). The database is trying to apply permissions to the second user, but its not specified, so it breaks.



Though, we should probably test if DSN2 is configured and if not, just default to DSN instead.

[right][post=“6430”]<{POST_SNAPBACK}>[/post][/right][/quote]