Installation Issue

Hello,


I have downloaded the latest release of the Matrix source code and uploaded it to my server



The Matrix core is located at /home/rylas/public_html/site



And the installer is located at /home/rylas/public_html/installer



I tried running the installer and all worked fine until I got to the database creation and PHP returned this error:


    Warning: processaction(XML/Tree.php): failed to open stream: No such file or directory in /home/rylas/public_html/installer/steps/databasecreate.inc on line 123
    
    Fatal error: processaction(): Failed opening required 'XML/Tree.php' (include_path='.:/usr/lib/php/;.:/usr/local/lib/php/;.:/home/rylas/pear/lib/') in /home/rylas/public_html/installer/steps/databasecreate.inc on line 123


Any ideas?

On step 14 of the installer (create system config), you should get a list of config variables that Matrix uses.


The SQ_CONF_PEAR_PATH variable should look something like this: /home/rylas/public_html/site/php_includes

Is that what you are seeing?



Bit of history…



We dont require XML_Tree for Matrix, but we have our own version in the php_includes directory that we use to parse the XML into a format we use. The SQ_CONF_PEAR_PATH variable is used to tell Matrix where to find the additional PEAR modules (XML_Tree in this case)

Oh, ok


I thought that when the installer asked me for the path to PEAR it meant the actual PEAR installtion.



Thanks a bunch

It does mean the PEAR installation when the installer asks you, but it seems that Matrix itself is trying to use XML_Tree but cant actually find it.


If it does not exist in PEAR, the next point of call should be the SQ_CONF_PEAR_PATH directory.

You're right, the installer is looking for the actual PEAR path. It never actually saves the path you enter in a config, it only uses it for checking the PEAR registry is there. By default the config the installer writes uses the system root variable you provide in step 3 and appends 'php_includes' to it, which you can check on step 14 of the install.

Ok, I got that working, those errors are gone, but now im getting more…

    Notice: Use of undefined constant SQ_INCLUDE_PATH - assumed 'SQ_INCLUDE_PATH' in /home/rylas/public_html/installer/steps/databasecreate.inc on line 127
    
    Warning: processaction(SQ_INCLUDE_PATH/system_config.inc): failed to open stream: No such file or directory in /home/rylas/public_html/installer/steps/databasecreate.inc on line 127
    
    Fatal error: processaction(): Failed opening required 'SQ_INCLUDE_PATH/system_config.inc' (include_path='.:/usr/lib/php/;.:/home/rylas/pear/lib/') in /home/rylas/public_html/installer/steps/databasecreate.inc on line 127


Any ideas on these?

Sounds like something has become confused (maybe the installer).


It might be worth just trying to restart the installer with a fresh system and try again. What exactly did you do to get the PEAR errors to go away?

well the first time i tryed to install it, i deleted the php_includes folder because i thought it was just a replica of the XML_Tree class that PEAR offers, so I removed everything, re-extracted, and started from a clean slate and it all seemed to work up until i got those latest errors. Ive tried restarting again but it did the same thing.


Ill think ill just take it the advanced way and use the command-line installer.

Check your MATRIX/data/private/conf/main.inc file. That's where SQ_INCLUDE_PATH is defined; if it's missing, something's gone wrong along the way.


Edited by Greg Sherwood:

Actually, its not set in main.inc - its generated in core/include/init.inc based on the current location of that particular file. It's very hard to get that SQ_INCLUDE_PATH define wrong because it is sytem generated.



Try logging out of the installer to clear your session and try again.

I tried again… no luck :frowning:


Is the script registering the SQ_INCLUDE_PATH global correctly?



Am I supposed to have my aliases in the httpd.conf before I get to this step?



Possible causes ^^

I find it simpler to wait until the Installer is complete before adding the aliases, so that shouldn't be causing a problem here.


What OS are you running? Does the user that Apache is running as have the permission to access the PEAR files?

This is pretty hard to debug from here, so here are some thing you can do.


Edit /home/rylas/public_html/installer/steps/databasecreate.inc

Current code looks like this around line 127

    // Re-generate the Config to make sure that we get any new defines that may have been issued
    require_once SQ_INCLUDE_PATH.'/system_config.inc';


Change that to this
    // Re-generate the Config to make sure that we get any new defines that may have been issued
    echo 'SESSION: "'.$_SESSION['sys_root'].'"';
    require_once SQ_INCLUDE_PATH.'/system_config.inc';


This should print out the location of where the installer thinks your Matrix system is installed. Is this correct ?

There sounds as though there's an issue with swapping from installer sessions to the matrix defined sessions. After creating the config, matrix has enough information to be initialised. From this point on the installer uses the session created by Matrix to store information in; it sounds as though somehow something is slipping through somewhere. Were you able to get anywhere with the cli install?

I’ve posted a new topic about how to install from the command line here

I was having the same issue. It turned out to be a php issue… I'm running php 4.3.4 on apache 1.3.29


php was configured, made and installed with:



./configure' '–with-mysql=/usr/local/mysql' '–with-apxs=/usr/local/apache/bin/apxs' '–with-xml' '–with-gettext' '–with-gd' '–with-zlib-dir' '–with-pspell'



But!!!



PHP info or "php -i" would only show:



./configure' '–with-mysql=/usr/local/mysql' '–with-apxs=/usr/local/apache/bin/apxs'



Now, the weird part was the programs were successfully using these other features; the webinstaller detected them for instance.



To fix, I went:



cd /usr/src/php-4.3.4

make clean

rm -f config.cache

./configure' '–with-mysql=/usr/local/mysql' '–with-apxs=/usr/local/apache/bin/apxs' '–with-xml' '–with-gettext' '–with-gd' '–with-zlib-dir' '–with-pspell'

make

make install



and voila it was working.



The clue that php was mis-behaving was running it in CLI mode, where I would get an error about gettext.so not being found. I checked that gettext was installed (it was), and I know that other sites we're running use gettext… so did a php -i which showed that it didn't think it was loaded.



Cheers,



Chris