Error at step_03.php... "Unable to create root folder"

I'm pretty new to installing MySource Matrix, but figured that since I managed to install it to use a PostgreSQL backend on a test machine, it surely can't be that hard to try a production install with our prod Oracle backend.


So after successfully building the PHP 5.1.6/Apache 2.2.3-11 CLI requirements on a Centos 5.2 (x64 system) for connecting to Oracle, I am now attempting to install MySource Matrix 3.20.1 with an Oracle 11g instance on a separate dedicated DB server ( PHP does list OCI8 as a supported extension from the phpinfo()) — but I keep running into issues at install/step_03.php.



When I attempt to run install/Step_03.php, I keep encountering this error:

    Fatal error: Uncaught exception 'Exception' with message 'Unable to create root folder, as it did not receive asset ID #1. Fragments of another system may exist in the database; please ensure the database is clear of previous installations before installing.' in /home/websites/mysource_matrix/core/assets/system/root_folder/root_folder.inc:72
    Stack trace:
    #0 /home/websites/mysource_matrix/core/assets/package_manager_core.inc(152): Root_Folder->create(Array)
    #1 /home/websites/mysource_matrix/core/include/package_manager.inc(850): Package_Manager_Core->createRootFolder()
    #2 /home/websites/mysource_matrix/install/install.inc(334): Package_Manager->installSystemAssets()
    #3 /home/websites/mysource_matrix/install/step_03.php(128): install_core(Array)
    #4 {main}
      thrown in /home/websites/mysource_matrix/core/assets/system/root_folder/root_folder.inc on line 72


This is despite having dropped the Matrix tablespace everytime to repeat the installation process from a clean mysource_matrix folder (freshly extracted from mysource_3-20-1.tar.gz)
    DROP INDEX MATRIX.sq_sch_idx_value;
    DROP TABLESPACE MATRIX INCLUDING CONTENTS;

(and even rm the matrix.dbf for good measure)

Please can anyone point me in the right direction for resolving this issue?

Thanks so much in advanced,
Eric.

PS: All the installation steps prior to install/step_03.php seem to work just fine, so I assumed the main.inc and db.inc were correctly setup, but included here for inspection with our server IPs masked as # (note that both matrix and matrix2 users have identical privileges - e.g. "GRANT CREATE VIEW TO matrix;" also was done for matrix2).

    <?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', 'CGEBS');
define('SQ_CONF_SYSTEM_OWNER', 'PROD');
define('SQ_CONF_SYSTEM_ROOT_URLS', 'matrix.intranet
#.#.#.#');
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', 'noah@the-ark.org.au');
define('SQ_CONF_TECH_EMAIL', 'noah@the-ark.org.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_HANDLER', '');
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', 64);
define('SQ_CONF_CRON_MEMORY_LIMIT', 64);
define('SQ_CONF_USE_DEFAULT_SESSION_SAVE_PATH', false);
define('SQ_CONF_CUSTOM_SESSION_SAVE_PATH', '');
define('SQ_CONF_ENABLE_ROLES_SYSTEM', true);
define('SQ_CONF_ENABLE_GLOBAL_ROLES', true);
define('SQ_CONF_TIMEZONE', 'Australia/Perth');
?></pre><br />

    <?php
    $db_conf = array (
    		'db' => array (
    				'DSN' => '#.#.#.#/PRODDB',
    				'user' => 'matrix',
    				'password' => 'password',
    				'type' => 'oci',
    			   ),
		'db2' => array (
			  'DSN' => '#.#.#.#/PRODDB',
			'user' => 'matrix',
				'password' => 'password',
				'type' => 'oci',
			   ),
		'db3' => array (
				'DSN' => '#.#.#.#/PRODDB',
				'user' => 'matrix2',
				'password' => 'password',
				'type' => 'oci',
			   ),
		'dbcache' => NULL,
		'dbsearch' => NULL,
		);

return $db_conf;
?></pre>

After dropping both matrix users as well as the matrix tablespace and restarting from the very beginning, I can now reproduce a warning from step_02.php. I did notice this warning on my first go, but didn't think to make anything out of it because when I ran step_02.php again (without resetting anything) this warning disappears and just says "done". Also, if I just drop the matrix tablespace - this warning doesn't appear to reoccur at step_02.php (thus only detected this when I dropped the two users and the tablespace to restart from the very beginning).

[quote]------------------------------------

OCI 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 Rollback View

sq_vw_ast_perm Rollback View

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



Configuring Roles Views… ±-------------------------------------------------------+

| PHP Warning |

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

| oci_execute(): ORA-00942: table or view does not exist |

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

done[/quote]



Contents of "data/private/logs/error.log":

[quote][2009-03-17 20:56:19][0:MySource System][2:php warning][R] (/core/lib/DAL/DAL.inc:596) - oci_execute(): ORA-00942: table or view does not exist[/quote]



I think perhaps is related to why it is failing in step_03.php.



Does this give any clues? What am I missing? :unsure:



PS: I know the matrix and matrix2 GRANT CREATE VIEWs went in successfully on the Oracle side.

Hi Eric,


The issue that you are seeing there is due to one of the views not being created correctly in the first run of step_02.php. If you run step_02.php again, you should see that this error will go away. As to why this is the case, im not too sure, but it may be a sequencing thing, but I would have to take a further look in to it.



Just to understand a little better the circumstances that you are seeing this, you say that it only happens when you drop users and table space, then start from scratch. Does this include starting with new source or are you reusing the source from the previous run?



I ask this as there are components that are built during the installation process, baked queries and the like that may not like being called when the tables no longer exist.



What i would be inclined to do is to take a copy of the configuration files from data/private/conf, but make sure that you exclude the system_assets.inc file. Then drop your database, and users and delete the matrix source and start the process from complete scratch.



Cheers



Owen Windsor

Hi Owen,


Thanks for your input. Indeed that is what I found when I re-ran step_02.php - so I thought I could move onto step_03.php without problems. B)



Regarding the clarification of circumstances for starting from scratch - yes, I do remove all the source directory as well (i.e. rm -Rf /home/websites/mysource_matrix) and re-extract it from the tgz. So thus far my attempted Matrix installations are from absolute clean slate with regards to the source and database (unless I'm missing something???).



As for your suggestion - after running step_01.php which creates db.inc and main.inc and changing them appropriately (as per instructions), I have indeed kept copies of these two "data/private/conf" files so that I can easily put them back each time I try a fresh install of Matrix (I noticed that at some point after step_01.php some of values are altered from say "true" to "1" and similar for "false" to "0", so figured best to make copies at the point that I plan re-introduce them, which would be before step_02.php).



So despite starting from what should be absolutely nothing, it is puzzling that I am still encountering the same error at step_03.php. :huh:



Is there any additional information I might be able to provide that would assist the diagnosis of this issue?



Thanks,

Eric.

Eric,
Did you get this issue resolved ?

If so could you please share your solution ?



I am trying to install 3.20.2 on RHEL5.2 with Oracle 10.2 and getting the Roles Views creation error at the end of Step 2



[codebox]Configuring Roles Views…

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

| PHP Warning |

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

| oci_execute(): ORA-00942: table or view does not exist |

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

done

[/codebox]



Rerun Step 2 with out error, subsequent compile locale, step 3 followed by compile locale steps complete without error.



Browsing to the admin page produces



[codebox]MySource Error

[ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]

[/codebox]



Regards

Barry

Hi Barry


Unfortunately, I have not found a resolution to my issue as yet. I couldn’t even make it past the Step_03.php stage without encountering errors, so it looks like you’re way ahead of me on this one.



Since no one seems to be having the same issue nor know how to solve it, my team lead has asked me to simply put PostgreSQL + Matrix combination into Prod till someone in the team (perhaps myself) has more time to go through exactly where things are falling down with the Oracle + Matrix installation. I’ll keep monitoring this thread, but you can assume that I’m not actively working towards a resolution at present.



As for your “session_handler_default” error - I’ll point you to this thread:

http://forums.matrix.squiz.net/index.php?showtopic=5894&pid=29828&mode=threaded&start=#entry29828

You should almost be there… as a summary of that thread, it looks like you just need to make sure you have all the required packages and modules before you start installation.



Good luck. :slight_smile:



Eric.


[quote]Eric,

Did you get this issue resolved ?

If so could you please share your solution ?



I am trying to install 3.20.2 on RHEL5.2 with Oracle 10.2 and getting the Roles Views creation error at the end of Step 2



[codebox]Configuring Roles Views…

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

| PHP Warning |

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

| oci_execute(): ORA-00942: table or view does not exist |

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

done

[/codebox]



Rerun Step 2 with out error, subsequent compile locale, step 3 followed by compile locale steps complete without error.



Browsing to the admin page produces



[codebox]MySource Error

[ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]

[/codebox]



Regards

Barry[/quote]

Eric,
Thanks for your reply, I had also found that post and had added in the missing pear modules and carried out a clean install but failed with the error. I am working with Squiz NZ on this as well and will post a solution when found, unfortunately I'll be offline for a few weeks.



Barry