Matrix install problems - RHEL 3.0

Hi - I'm trying to install MySource Matrix on a RHEL 3.0 server running MySQL. I have been running through the web installer and all appears fine until I get an error at step 12:

    The database appears to be an unsupported version. This may cause problems with installation.


I then click next through to step 15 where I get the following error after clicking next:

    MySource Error
    File:  /home/mysource/mysource_matrix_installer/steps/databasecreate.inc  Line:  344
    Message:  DB Error: unknown error
    CREATE TABLE sq_asset_editing_access (userid VARCHAR(140) NOT NULL DEFAULT 0,type_code VARCHAR(140),screen VARCHAR(100),section VARCHAR(100),PRIMARY KEY(userid,type_code,screen,section)) TYPE=innodb [nativecode=1171 ** All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead]
MYSQL < 4.0.3 - SKIPPING SET TABLE TYPE</pre><br />

if I then click back on the browser, then next again it appears that the database is fine:

    Performing step 15 / 17 	 
DATABASE TABLE COLUMN CACHING COMPLETE</pre><br />

I checked the database manually and the following tables had been created:

[quote]  sq_asset
  sq_asset_attribute
  sq_asset_attribute_unique_value
  sq_asset_attribute_value
  sq_asset_link
  sq_asset_link_tree
  sq_asset_lookup
  sq_asset_lookup_design
  sq_asset_lookup_remap
  sq_asset_path
  sq_asset_permission
  sq_asset_type
  sq_asset_type_inherited
  sq_asset_url
  sq_package
  sq_rollback_asset
  sq_rollback_asset_attribute_unique_value
  sq_rollback_asset_attribute_value
  sq_rollback_asset_link
  sq_rollback_asset_link_tree
  sq_rollback_asset_lookup
  sq_rollback_asset_lookup_design
  sq_rollback_asset_lookup_remap
  sq_rollback_asset_path
  sq_rollback_asset_permission
  sq_rollback_asset_url
  sq_sequence_internal_message_seq[/quote]

which looked promising. but finally on step 16 I get the following error:

    MySource Warning
    File:  [SYSTEM_ROOT]/core/assets/package_manager_core.inc  Line:  105
    Message:  DB Error: no such table
    DELETE FROM sq_asset_indexing_weightings_default WHERE type_code = 'asset' [nativecode=1146 ** Table 'pacefarm.sq_asset_indexing_weightings_default' doesn't exist]
MySource Warning
File: &nbsp;[SYSTEM_ROOT]/core/include/mysource.inc &nbsp;Line: &nbsp;1343
Message: &nbsp;DB Error: no such table
INSERT INTO sq_internal_message (messageid, userto, userfrom, subject, body, type, priority, status, sent, parameters) VALUES (1, 0, 0, 'Install', 'Core Package FAILED', 'install.system', 3, 'U', '2004-09-08 01:49:09', '') [nativecode=1146 ** Table 'pacefarm.sq_internal_message' doesn't exist]

MySource Error
File: &nbsp;[SYSTEM_ROOT]/core/include/transaction_manager.inc &nbsp;Line: &nbsp;154
Message: &nbsp;DB Error: unknown error
ROLLBACK [nativecode=1196 ** Warning: Some non-transactional changed tables couldn't be rolled back]</pre><br />

the setup as reported by the installer is:

    Performing step 4 / 17 	 
    PHP Modules  Minumum Version   
    PHP  4.3.3  
    GD 	 
    Zlib 	 
    PSpell 	 
    PEAR Packages  Minumum Version   
    DB  1.6.2  
    Archive_Tar  1.1  
    Mail  1.1.3  
    Mail_Mime  1.2.1  
    XML_HTMLSax  2.1.2  
    XML_Parser  1.0.1


but the actual setup is:

    php-mysql-4.3.8-sp.3ES.1
    php-ldap-4.3.8-sp.3ES.1
    php-4.3.8-sp.3ES.1
    php-imap-4.3.8-sp.3ES.1
    httpd-2.0.46-32.ent.3.WB1
    mysql-3.23.58-1



can someone explain why this configuration is not working or where I shoud start looking to remedy this. is there a way to install manually as with 2.x - or is matrix a web only install?

Thanks!

Dan.

Odd. It looks like you’ve upgraded PHP on your RHEL box, but that Apache hasn’t noticed. :slight_smile: There is a command-line based installer, but you need a CLI version of PHP, which RHEL usually does not have.


For all the installations of Matrix on RHEL, I usually leave the original RH PHP RPMs in place (4.3.2), install postgresql-server (and php-pgsql) and use the web-based installer. You may need to add one or two PEAR modules (off the top of my head, I think Mail_Mime and XML_HTMLSax), but that should be it.



If you want to use the CLI version, there is a command-line based installer that will install a second copy of PHP in /usr/local/bin/php-cli on RHEL.

Yeah, from the looks of it you haven't restarted apache after updating it? (just a guess).

From what I remember RHEL still uses a 3.23 version of MySQL, yes? (Looking from the package list at the end of your post, yes. :slight_smile: ) Hence the message on step 12 (as I understand it the web-based installer only fully supports version 4.0) and the error on step 15. This is a known issue with MySQL 3.23 and a fix will be available in the upcoming RC2 version of Matrix - this cannot be fixed in the installer from what I'm aware.


The rest of the errors seem to point to me that once it hit that error it didn't bother installing any further tables, because that is only half of the tables it should be installing (as a check, from memory there should be 51 tables in an RC1 install, if you have rollback turned on).



BTW (this is also for Avi :slight_smile: ), the web-based installer does not report to you what your current versions are - only the minimum versions required and the pass/fail for each line. If you have a tick next to the PHP line, it means you have at least 4.3.3 installed - which means it may well be picking up your 4.3.8 version correctly. (Run a phpinfo() script on your web server to double check, if you need to.)

[quote]I then click next through to step 15 where I get the following error after clicking next:

    MySource Error
    File:  /home/mysource/mysource_matrix_installer/steps/databasecreate.inc  Line:  344
    Message:  DB Error: unknown error
    CREATE TABLE sq_asset_editing_access (userid VARCHAR(140) NOT NULL DEFAULT 0,type_code VARCHAR(140),screen VARCHAR(100),section VARCHAR(100),PRIMARY KEY(userid,type_code,screen,section)) TYPE=innodb [nativecode=1171 ** All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead]
    
    MYSQL < 4.0.3 - SKIPPING SET TABLE TYPE
[/quote]

I had this problem too. Tracked it down to te version of mySQL (which we weren’t able to update for some reason). There’s a bunch of entries in mysource/core/db/tables.xml which have <column name="[field_name]" allow_null=“1”> and the allow_null needs set to 0.



There’s a diff in this thread that fixes this for me.

Thanks all for the info. I had upgraded php myself to 4.3.8, and php appears to be operating fine. I read though and tried all the suggestions - the closest I got to success was with Citize Gold's comments - although the patch you supplied would not apply to my tables.xml file.


I rolled back my php install to a virgin 4.3.8 and now my pear packages look like this:


    Installed packages:
    ===================
    Package        Version State
    Archive_Tar    1.1     stable
    Auth_SASL      1.0.1   stable
    Console_Getopt 1.2     stable
    DB             1.6.2   stable
    HTTP           1.2.2   stable
    Mail           1.1.3   stable
    Mail_Mime      1.2.1   stable
    Net_SMTP       1.2.3   stable
    Net_Socket     1.0.1   stable
    PEAR           1.3.2   stable
    XML_HTMLSax    2.1.2   stable
    XML_Parser     1.0.1   stable
    XML_RPC        1.1.0   stable
    XML_Tree       1.1     stable


I edited the tables.xml file manually and changed allow_null="1" to allow_null="0" in the places indicated in the patch file. Once this was done I deleted the matrix install I was trying to set up, copied in the updated tables.xml file and then ran the web installer.

I was able to get all the way through the installer with no hint of an error apart from a warning on step 12:

[quote]The database appears to be an unsupported version. This may cause problems with installation.[/quote]

other than that everything appears to be set up correctly. at the end of the install I have 51 tables in my database.

I did notice on step 14 it appears that SQ_PHP_CLI does not have a value. But I didn't imagine that this would be causing problems?

After the install, when clicking on the admin url I get the following error from apache:

[quote]Not Found

The requested URL /_admin/ was not found on this server.[/quote]

I notice in the error logs that apache is compaining about not being able to find a file:

[quote]File does not exist: /path/to/public/web/dir/index.php/[/quote]

notice the trailing slash on index.php...

and when trying to go the top level of the server I get this error from MySource:

[quote]MySource Notice
File:  [SYSTEM_ROOT]/core/include/mysource.inc  Line:  289
Message:  URL "my.domain.name" not found[/quote]

where my.domain.name is the domain name for the mysource server.

and again I'm stumped. any more clues?

avi - are you suggeting I should be using postgresql rather than the upgraded mysql? seeing as I have my 51 tables created and no significant database setup errors I'm thinking this issue lies elsewhere.

thanks again!

dan.

ps. my .htacces is standard as per the install:

    Options +FollowSymLinks
    RewriteEngine On
#Set the base uri
RewriteBase /
#Now do some rules for redirection
#if index, don't redirect (again)
RewriteRule index.php &nbsp; - [L]
#don't redirect double-underscore dirs
RewriteRule __lib &nbsp; &nbsp; &nbsp; - [L]
RewriteRule __data &nbsp; &nbsp; &nbsp;- [L]
RewriteRule __fudge &nbsp; &nbsp; - [L]
#redirect everything else to index.php
RewriteRule (.*) &nbsp; &nbsp; &nbsp; &nbsp;index.php/$1 [L]</pre>

No, you've got it up and running now (the MySource error you get at my.domain.com is by design – Matrix is running, but can't find a site asset for your URL, because you haven't created one yet). Now, we just need to get you logging in to the Administration Interface. :slight_smile:


Did you install Matrix in your web server's Document Root (e.g. /var/www/html), under that directory (e.g. /var/www/html/matrix) or outside that location completely (e.g. /var/www/matrix)? RHEL is quite restrictive about where it'll allow the webserver to follow SymLinks and to override other settings.



To test: Create a test.html file in the mysource_matrix/fudge directory and see if you can get to it via my.domain.com/__fudge/test.html (that's a double-underscore, btw). If that works, at least we know that symbolic link s are working.

it appears the symbolic links are working fine - I was accessing the __data __lib and __fudge directories with my browser last nght… and was excited by what I saw…


it appears that the problem is now centred around the _admin alias only.



is it normal for the _admin url to resolve to



/home/myweb/public_html/index.php/_admin



I'm a bit confused by this RewriteRule:


    #redirect everything else to index.php
    RewriteRule (.*)        index.php/$1 [L]


it seems to me that the resulting rewritten query will be treating index.php as though it is a directory, not a file... and that is why apache is kicking up errors? I did notice that this is a standard config for matrix - it also features if you don't go the symbolic link route and put the rewrite functions directly in the httpd.conf - it's also mentioned elsewhere in the forums - I guess I just don't understand how it's going to work. :unsure:

The rewrite rule basically says to send everything to index.php, and append after it anything that comes after the domain.com/ part (assuming domain.com was set up as your system root url). Is the symbolic link in /home/myweb/public_html pointing to matrix/core/web/index.php?


Have you tried usine Apache aliases (instead of rewrite)? Aliases seem to be more reliable.

Hi - I did try using the apache aliases first - but was having little success with that too. I ended up in the same place both times though - in that when I make a request for


http://domain.com/



apache is trying to serve the following:



/home/myweb/public_html/index.php/



(notice the trailing slash) which does not exist on the server.



accessing the url



http://domain.com/



does reach the index.php file, and the php is run correctly - except that the domain is not set up so I get an error from MySource stating that the URL is not known. This appears to be due to the fact that no sites have been configured in MySource as yet, as I can’t access the _admin URL… as suggested by Avi?



I did note that it is recommended not to use Apache 2 - but unfortunately that is how the server is set up by default… I’d rather not have to downgrade to 1.3 specially seeing as it’s suggested that matrix has been tested on 2.0 - is it possible that the way the rewrite / aliases are handled by apache 2 is not in line wiht the way Mysource wants to use them?

I have a few servers running RHEL with Apache 2 and Matrix quite successfully, though all of them use the Alias method. Try using the following Alias lines instead (and remember to REMOVE the .htaccess file!):

    Alias “/__data”    “/path/to/matrix/data/public”
Alias “/__lib” “/path/to/matrix/core/lib”
Alias “/__fudge” “/path/to/matrix/fudge”
AliasMatch “^(/.*)?$” “/path/to/matrix/core/web/index.php”

legend… I'm in!


thanks… all appears to be working great - will let you know how we go getting the site configured…



thanks again for the support & great product!



:D’ /> <img src=‘http://forums.matrix.squiz.net/public/style_emoticons/<#EMO_DIR#>/biggrin.gif’ class=‘bbc_emoticon’ alt=':smiley:

Yay!