Step 2 problems (for version 3.8.0)

Hi Everyone,


I'm trying to install mysource matrix version 3.8.0 onto a Debian system -

running

PHP Version: 4:4.3.10-16

POSTRESQL: Version: 7.4.7-6sarge1



Upon running step two, I get the following error… (below)



Any advice or pointers would be greatly appreciated.



Many thanks,



Andrew


[quote]…

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

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

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

| MySource Error                                                                                            |

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

| Error text not found for this code and locale [SYS0270]                                                  |

| array (                                                                                                  |

|  0 => '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.]', |

|  1 => 566,                                                                                              |

|  2 => '[SYSTEM_ROOT]/core/lib/db_install/db_install.inc',                                                |

| )                                                                                                        |

±----------------------------------------------------------------------------------------------------------+[/quote]

Looks like you haven't configured the DSN2 and DSN3 settings in main.inc. Can you post the contents of your mysource_matrix/data/private/conf/main.inc file?

[quote]Looks like you haven’t configured the DSN2 and DSN3 settings in main.inc. Can you post the contents of your mysource_matrix/data/private/conf/main.inc file?
[right][post=“9216”]<{POST_SNAPBACK}>[/post][/right][/quote]





Thanks for the quick reply.

I only have one db connection method, so I duplicated it for the secondary.


[quote]define('SQ_CONF_DB_DSN', 'pgsql://matrix:password@127.0.0.1/matrixdb');

define('SQ_CONF_DB2_DSN', 'pgsql://matrix:password@127.0.0.1/matrixdb');

define('SQ_CONF_DB3_DSN', '');[/quote]



(let me know if you need the rest of the config)



I also found this in the postresql logs -

[quote]2006-03-20 18:54:22 [31901] NOTICE:  tablename is sq_rb_vw_ast_lnk_major

2006-03-20 18:54:22 [31901] NOTICE:  tablename is sq_vw_ast_role

2006-03-20 18:54:22 [31901] NOTICE:  tablename is sq_vw_ast_perm

2006-03-20 18:54:22 [31901] 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.[/quote]





Cheers,

Andrew

You need to set all 3 DSNs.


Have a look at the install guide for more info:

http://matrix.squiz.net/resources/installation

Also, remember to create another user for DSN3 – they need to be different so that PostgreSQL doesn't block transactions from completing.

Mac OSX, postgres, php 4.3.11


I am replacing 3.6.2 with 3.8. That is to say, I installed 3.6.2 successfully, but didn't get much chance to play with it and only had some rudimentary pages created, so I'm completely replacing the installation rather than upgrading. I dropped the previous database and the users and started completely from scratch, with a new source directory, following the new installation instructions.



When I attempt step 02 I get


    root# php install/step_02.php /Library/WebServer/mysource_matrix
    +------------------------------------------------+
    | MySource Error                                 |
    |------------------------------------------------|
    | File : [SYSTEM_ROOT]/core/include/mysource.inc |
    | Line : 1822                                    |
    |------------------------------------------------|
    | DB Error: extension not found                  |
    +------------------------------------------------+


As I said, I had 3.6.2 installed fine, nothing in my system configuration has changed, and there don't appear to be any new requirements for 3.8 over 3.6.2. Where else should I be looking for problems?

Thanks.

Did you do a MacOS X upgrade? Sounds like PHP got "upgraded" to a version that hasn't been compiled with PostgreSQL support.


Though, you're probably using a different version of PHP for Apache and that version still has PostgreSQL support.

[quote]Did you do a MacOS X upgrade? Sounds like PHP got “upgraded” to a version that hasn’t been compiled with PostgreSQL support.


Though, you’re probably using a different version of PHP for Apache and that version still has PostgreSQL support.

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



I didn’t upgrade, but a security patch came through and it looks like the default php cli is, indeed, now 4.4.1 with no pgsql support. Fortunately, the older cli is still on my system (a custom compile so the updater didn’t see it, I guess). Using that seems to be working fine.



Thanks.

[quote]I didn’t upgrade, but a security patch came through and it looks like the default php cli is, indeed, now 4.4.1 with no pgsql support. Fortunately, the older cli is still on my system (a custom compile so the updater didn’t see it, I guess). Using that seems to be working fine.
[right][post=“9286”]<{POST_SNAPBACK}>[/post][/right][/quote]



No worries. We just did an upgrade on one of our MacOS X Server based clients and ran into the same problem. :slight_smile:

Hi Again,


I managed to get the DSN's entered in correctly, and the install proceeded without error.



I followed the apache alias'es and permissions instructions, however when I try to load the admin interface (…url _admin, correct?) I get the following errors:



I had a quick look through the manuals, but wasn't able to find advice on this issue - any advice greatly appreciated.



Kind Regards,

Andrew


[quote]MySource Warning

System asset name "public_user" not installed or not known [SYS0209]





PHP Warning

Cannot modify header information - headers already sent by (output started at [SYSTEM_ROOT]/core/include/general.inc:174)





PHP Warning

Cannot modify header information - headers already sent by (output started at [SYSTEM_ROOT]/core/include/general.inc:174)





MySource Warning

System asset name "root_folder" not installed or not known [SYS0209]





MySource Error

Unable to get Root Folder Asset [SYS0248][/quote]

Doesn't look like the install finished properly: Did you run step_02.php and step_03.php? Those system assets should have been created during the step_03.php execution.

[quote]Doesn’t look like the install finished properly: Did you run step_02.php and step_03.php? Those system assets should have been created during the step_03.php execution.
[right][post=“9425”]<{POST_SNAPBACK}>[/post][/right][/quote]



Hi, I re-ran step 3 and noticed the following errors:

(any hints as to my next step?)



Thanks,

A


[quote]<?php

define('SQ_PASSWD_RULE_LENGTH', 6);

define('SQ_PASSWD_RULE_DISALLOW_USER_INFO', 1);

define('SQ_PASSWD_RULE_NUM_CAPS', 0);

define('SQ_PASSWD_RULE_NUM_LOWER', 0);

define('SQ_PASSWD_RULE_NUM_INT', 0);

define('SQ_PASSWD_RULE_NUM_PUNC', 0);

define('SQ_PASSWD_RULE_NUM_SPC', 0);

define('SQ_PASSWD_RULE_DISALLOWED', -1);

define('SQ_PASSWD_RULE_DISABLED', 0);

?>

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



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

Installing package_manager_core:

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

0 => simple_form

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

| MySource Warning    |

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

| [ASSERT EXCEPTION] DB Error: no such table    |

| INSERT INTO sq_ast_attr    |

|                              (attrid, type_code, owning_type_code, name, type, uniq, parameters_type_code, default_type_code, default_val, parameters_val, is_admin, description)      |

|                              VALUES                              |

|                              ('502',                              |

|                              'simple_form',                              |

|                              'simple_form',                              |

|                              'name',                              |

|                              'text',                              |

|                              0,                              |

|                              'simple_form',                              |

|                              'simple_form',                              |

|                              '',                              |

|                              'a:0:{}',                              |

|                              1,                              |

|                              '') [nativecode=ERROR:  column "is_admin" of relation "sq_ast_attr" does not exist] (LINE 588 IN [SYSTEM_ROOT]core/include/asset_management.inc) [SYS0270] |

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

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

| MySource Warning                                                |

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

| Unable to Commit, Transaction has already been aborted [SYS0220] |

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

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

| MySource Warning                                        |

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

| Unable to Rollback, No Transaction is Open [SYS0231]    |

±---------------------------------------------------------+[/quote]

I would suggest dropping the database, deleting the mysource_matrix directory and starting again: You've got a completely confused installation. The filesystem believes the database is configured but the tables and columns have not been successfully created yet. There is no easy way to fix this except by starting again clean.

[quote]I would suggest dropping the database, deleting the mysource_matrix directory and starting again: You’ve got a completely confused installation. The filesystem believes the database is configured but the tables and columns have not been successfully created yet. There is no easy way to fix this except by starting again clean.
[right][post=“9441”]<{POST_SNAPBACK}>[/post][/right][/quote]





Thank you :slight_smile: - I will start again.





Cheers,

Andrew

[quote]Thank you :)  - I will start again.
Cheers,

Andrew

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





Now I get this (on step 2)



Thanks,

Andrew


[quote]?>

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

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

| MySource Error                                                            |

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

| Error text not found for this code and locale [SYS0270]                                                            |

| array (                                                            |

|  0 => 'DB Error: unknown error                                                            |

| – creates a function that grants access to the secondary user.                                                            |

|                      – This function should be called after all the tables in the system                                                                              |

|                      – have been created                                                                              |

|                      CREATE OR REPLACE FUNCTION sq_grant_access(character varying) RETURNS TEXT AS \'                                                                              |

|                      DECLARE                                                                              |

|                              user_name ALIAS FOR $1;                                                                                      |

|                              table RECORD;                                                                                      |

|                              tablename TEXT;                                                                                      |

|                      BEGIN                                                                              |

|                              FOR table IN SELECT c.relname AS name FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN (\'\'r\'\',\'\'v\'\',\'\'S\'\',\'\'\'\') AND n.nspname NOT IN (\'\'pg_catalog\'\', \'\'pg_toast\'\') AND pg_catalog.pg_table_is_visible(c.oid) LOOP |

|                                      tablename=table.name;                                                                                            |

|                                      RAISE NOTICE \'\'tablename is %\'\', tablename;                                                                                            |

|                                      EXECUTE \'\'GRANT ALL ON \'\' || quote_ident(tablename) || \'\' TO \'\' || quote_ident(user_name::text);                                                                                            |

|                              END LOOP;                                                                                      |

|                              RETURN \'\'access granted.\'\';                                                                                      |

|                      END;                                                                              |

|                      \'                                                                              |

|                      LANGUAGE plpgsql; [nativecode=ERROR:                                                                              |

±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+[/quote]

You need to add the plpgsql languange to your database:

createlang plpgsql <databasename>

[quote]You need to add the plpgsql languange to your database:

createlang plpgsql <databasename>

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



Thanks, i missed this after I started from scratch again :frowning:



After running step three I get this error (see below): Any more hints?



Thank you for your extended support.



Regards,

Andrew


[quote]±--------------------------------------------------------------------------------------------------------------------- --------+

| MySource Error        |

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

| The new Root Folder Asset was not given assetid #1. This needs to be fixed by YOU, consider this system corrupted [CO RE0077] |

±--------------------------------------------------------------------------------------------------------------------- --------+[/quote]

Weird. I haven't seen that one in ages. Did you completely drop the database or just empty it? It feels like your sequences weren't erased, so it didn't start numbering at 1.


You're going to hate me for saying this, but the simplest fix is to drop the database, and erase the filesystem and start from a fresh tarball. :slight_smile:

[quote]Weird. I haven’t seen that one in ages. Did you completely drop the database or just empty it? It feels like your sequences weren’t erased, so it didn’t start numbering at 1.


You’re going to hate me for saying this, but the simplest fix is to drop the database, and erase the filesystem and start from a fresh tarball. :slight_smile:

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



Hi,



I used “DROP DATABASE” to drop the database to start from scratch, then removed the old mysource_matrix directory, and unpacked from a fresh tarball. I’ll try again.



I am using a version of postgresql that is on the fringe of the requirements (it is within the version requirements, but just), could this be creating my problems?



Thanks,

Andrew.

[quote]I am using a version of postgresql that is on the fringe of the requirements (it is within the version requirements, but just), could this be creating my problems?
[right][post=“9528”]<{POST_SNAPBACK}>[/post][/right][/quote]



No, 7.4.7 should work (though its pretty slow). v8.1 is significantly faster.