Installation Problem


(Agibson) #1

Hello,


I am having trouble installing MySource Matrix on Ubuntu 10.04. In step 02 I have the following error


    
    Fatal error: Uncaught exception 'DALException' with message 'SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "sq_ast_typ" does not exist
    LINE 2:     FROM sq_ast_typ
                 ^' in /home/ubuntu/mysource_matrix/core/lib/DAL/DAL.inc:658


I had previously completed all the steps in the installation, but got the following error when attempting to login to the webserver.
    [2010-05-12 22:41:24][0:MySource System][256:mysource error][R] (/core/include/locale_manager.inc:504) - [ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]

At that time, I followed the instructions to drop the database and start again, and this is where I am currently, stuck on Step02.

Basic Information:

POSTGRES IS SETUP WITH THE FOLLOWING
    
    postgres=# \l
                                     List of databases
      Name       |  Owner   | Encoding |  Collation  |    Ctype    |   Access privileges
    -----------------+----------+----------+-------------+-------------+-----------------------
     mysource_matrix | matrix   | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 |
     postgres        | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 |
     template0       | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 | =c/postgres
                                                                   : postgres=CTc/postgres
     template1       | postgres | UTF8     | en_AU.UTF-8 | en_AU.UTF-8 | =c/postgres
                                                                   : postgres=CTc/postgres
    (4 rows)
postgres=# \du
           List of roles
Role name     | Attributes  | Member of
------------------+-------------+-----------
 matrix           |             | {}
 matrix_secondary |             | {}
 postgres         | Superuser   | {}
              : Create role
              : Create DB




db.conf looks like this


    
    <?php
    $db_conf = array (
        'db' => array (
                'DSN'      => 'pgsql:dbname=mysource_matrix',
                'user'     => 'matrix',
                'password' => 'matrix',
                'type'     => 'pgsql',
               ),
        'db2' => array (
                'DSN'      => 'pgsql:dbname=mysource_matrix',
                'user'     => 'matrix',
                'password' => 'matrix',
                'type'     => 'pgsql',
               ),
        'db3' => array (
                'DSN'      => 'pgsql:dbname=mysource_matrix',
                'user'     => 'matrix_secondary',
                'password' => 'matrix',
                'type'     => 'pgsql',
               ),
        'dbcache' => array (
                'DSN'      => 'pgsql:dbname=mysource_matrix',
                'user'     => 'matrix',
                'password' => 'matrix',
                'type'     => 'pgsql',
               ),
        'dbsearch' => NULL,
        );
    
    return $db_conf;
    ?>

(Dan Simmons) #2

The first error you posted is usually a red herring that indicates another problem. Is there anything else in the error log prior to that?


(Benjamin Pearson) #3

[quote]
I am having trouble installing MySource Matrix on Ubuntu 10.04. In step 02 I have the following error

[/quote]



Since you are running Ubuntu 10.04 you should be aware that the default installation is running PHP 5.3, which Matrix does not support at the moment. This will be an issue with installing since Matrix will not install at all. A workaround to get Matrix working is to backport PHP to the Karmic sources (mentioned here)


(Peter Sheppard) #4

Until such time as Matrix supports php5.3, would it be worth putting a version detection in step_02.php (not step_01 or it won't catch people upgrading onto new servers), to stop hours of searching?


(Agibson) #5

Thankyou for your quick feedback. I will backport to an earlier version of PHP, and try again, and update this topic with my result. Thanks


Just for other people's benefit, there seemed to be an error in the script to download the older version of PHP, I had to remeove the '-e' to make it work. For my system it should be:

    
    dpkg -l | grep php | cut -c 5-25 > ~/php.installed
    sed s/lucid/karmic/g /etc/apt/sources.list | tee /etc/apt/sources.list.d/karmic.list
    for i in `cat ~/php.installed`; do echo "Package: $i\nPin: release a=karmic\nPin-Priority: 991\n\n" >> /etc/apt/preferences.d/php; done
    apt-get update
    apt-get install `cat ~/php.installed`

(Agibson) #6

Hello. I installed the Karmic version of PHP5, deleted my mysource_matrix folder and database, and started again. The scripts finished, but I am getting the following error when attempting to open MySource Matrix in the browser:

    
    [2010-05-14 04:13:52][0:MySource System][256:mysource error][R] (/core/include/locale_manager.inc:504) - [ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]


Now there were some warning errors thrown in the STEP02 script, below, but there was a error about not finding sendmail. Will this stop the installation of MySourceMatrix?

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1175
    PHP Warning:  Unable to Write to log file /home/ubuntu/mysource_matrix//data/private/logs/error.log [SYS0051] in /home/ubuntu/mysource_matrix/core/include/locale_manager.inc on line 504
Warning: Unable to Write to log file /home/ubuntu/mysource_matrix//data/private/logs/error.log [SYS0051] in /home/ubuntu/mysource_matrix/core/include/locale_manager.inc on line 504
+-------------------------------------------------------------------------------------+
| MySource Warning                                                                    |
|-------------------------------------------------------------------------------------|
| File "assets/login_design/0004/22/parse.txt" not found in the repository [FVER0007] |
+-------------------------------------------------------------------------------------+
PHP Warning:  fopen(/home/ubuntu/mysource_matrix//data/private/logs/error.log): failed to open stream: Permission denied in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1174

Warning: fopen(/home/ubuntu/mysource_matrix//data/private/logs/error.log): failed to open stream: Permission denied in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1174
PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1175

Warning: fwrite(): supplied argument is not a valid stream resource in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1175
PHP Warning:  Unable to Write to log file /home/ubuntu/mysource_matrix//data/private/logs/error.log [SYS0051] in /home/ubuntu/mysource_matrix/core/include/locale_manager.inc on line 504

Warning: Unable to Write to log file /home/ubuntu/mysource_matrix//data/private/logs/error.log [SYS0051] in /home/ubuntu/mysource_matrix/core/include/locale_manager.inc on line 504
+-------------------------------------------------------------+
| MySource Warning                                            |
|-------------------------------------------------------------|
| Failed checking out latest version of parse file [CORE0158] |
+-------------------------------------------------------------+
PHP Warning:  fopen(/home/ubuntu/mysource_matrix//data/private/logs/error.log): failed to open stream: Permission denied in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1174

Warning: fopen(/home/ubuntu/mysource_matrix//data/private/logs/error.log): failed to open stream: Permission denied in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1174
PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1175

Warning: fwrite(): supplied argument is not a valid stream resource in /home/ubuntu/mysource_matrix/core/include/general.inc on line 1175
PHP Warning:  Unable to Write to log file /home/ubuntu/mysource_matrix//data/private/logs/error.log [SYS0051] in /home/ubuntu/mysource_matrix/core/include/locale_manager.inc on line 504

Warning: Unable to Write to log file /home/ubuntu/mysource_matrix//data/private/logs/error.log [SYS0051] in /home/ubuntu/mysource_matrix/core/include/locale_manager.inc on line 504
+-----------------------------------------------------+
| MySource Error                                      |
|-----------------------------------------------------|
| Login Design NOT CREATED [CORE0001]                 |
+-----------------------------------------------------+
sh: /usr/sbin/sendmail: not found




One more piece of information is that my installation of postgres wouldn't allow for ASCII encoding, but insisted on UTF8. This wouldn't be a problem would it?



I am installing sendmail and trying again, but thought I would post this to you if you have any direction?

(Agibson) #7

Hello,


I have now installed Sendmail, restarted the installation with a clean database and redoing the installation all the way from the tar command, I even followed the extra instructions here. But still I get the following error when accessing any page through the browser. There is also an error thrown by the CRON job. I have included the error.log extract here. Can anyone help me? I have run out of ideas!


    
    [2010-05-14 21:26:27][0:MySource System][256:mysource error][R] (/core/include/locale_manager.inc:504) - [ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]
    [2010-05-14 21:30:01][0:MySource System][512:mysource warning][R] (/core/include/locale_manager.inc:504) - Asset Type "root_user" is not installed on this system [SYS0091]
    [2010-05-14 21:30:01][0:MySource System][256:mysource error][R] (/core/include/locale_manager.inc:504) - Unable to get Root User [CRON0023]
    [2010-05-14 21:37:59][0:MySource System][256:mysource error][R] (/core/include/locale_manager.inc:504) - [ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]
    [2010-05-14 21:38:01][0:MySource System][256:mysource error][R] (/core/include/locale_manager.inc:504) - [ASSERT EXCEPTION] Asset "session_handler_default" is not installed on the system, unable to include its source file [SYS0320]


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

Other information which may help:

PEAR INSTALLED PACKAGES
    Installed packages, channel pear.php.net:
    =========================================
    Package          Version State
    Archive_Tar      1.3.3   stable
    Console_Getopt   1.2.3   stable
    DB               1.7.13  stable
    Mail             1.2.0   stable
    Mail_Mime        1.7.0   stable
    PEAR             1.9.0   stable
    Structures_Graph 1.0.2   stable
    Text_Diff        1.1.1   stable
    XML_HTMLSax      2.1.2   stable
    XML_Parser       1.3.2   stable
    XML_Util         1.2.1   stable


[b]modified parts of the main.inc file[/b]
    define('SQ_CONF_SYSTEM_NAME', 'MySourceMatrix Test System');
    define('SQ_CONF_SYSTEM_OWNER', '');
    define('SQ_CONF_SYSTEM_ROOT_URLS', 'ubuntu.bom.gov.au');
    define('SQ_CONF_DEFAULT_EMAIL', 'agibson@bom.gov.au');
    define('SQ_CONF_TECH_EMAIL', 'agibson@bom.gov.au');


[b]folders in the system root[/b]
    ubuntu@ubuntu:~/mysource_matrix/core/assets/system/session_handling/session_handler_types$ ls -al
    total 20
    drwxr-xr-x 5 1090 staff 4096 May  3 15:42 .
    drwxr-xr-x 5 1090 staff 4096 May  3 15:41 ..
    drwxr-xr-x 2 1090 staff 4096 May  3 15:42 CVS
    drwxr-xr-x 3 1090 staff 4096 May  3 15:41 session_handler_default
    drwxr-xr-x 3 1090 staff 4096 May  3 15:41 session_handler_memcache


[b]/etc/default/locale [/b]
    LANG="C"
    LANGUAGE="C"


[b]/etc/hosts[/b]
    127.0.0.1       localhost
    127.0.1.1       ubuntu.bom.gov.au       ubuntu
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

(Dan Simmons) #8

The installation hasn't completed correctly. :frowning:


Can you paste the output of `php -m' ?


(Agibson) #9

Output of php -m

    ubuntu@ubuntu:~/mysource_matrix$ php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    ctype
    date
    dba
    dom
    exif
    filter
    ftp
    gettext
    hash
    iconv
    json
    libxml
    mbstring
    mime_magic
    mysql
    mysqli
    ncurses
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_pgsql
    pgsql
    posix
    readline
    Reflection
    session
    shmop
    SimpleXML
    soap
    sockets
    SPL
    standard
    sysvmsg
    sysvsem
    sysvshm
    tokenizer
    wddx
    xml
    xmlreader
    xmlwriter
    zip
    zlib
    
    [Zend Modules]

(Dan Simmons) #10

Hrmmm, looks fine to me. Can you re-run the installation steps on a fresh install but log the output and attach it here (using script&#39; orscreen -L')? Also attaching error.log and system.log will help.


(Agibson) #11

Hi Dan,
I have done a fresh install. thankyou for your help. No quite sure how to attach files to this forum, and they are probably too long to insert into this box.



Files zipped at http://rapidshare.com/files/388663847/Logs.zip.html


(Dan Simmons) #12

Hrm, it looks like everything is going fairly smoothly except that step_03.php doesn't complete properly. From the log files it seems to stop after getting half-way through the installation of the ecommerce package.


Here is the output from the end of your step_03:


    ----------------------------------
    
    ------------------------------------
    Installing Package_Manager_Ecommerce:
    ------------------------------------
    0 => form_ecommerce 
    1 => donation 
    2 => ecommerce_delivery_method 
    3 => paypal_business_account 
    4 => paypal_order 
    5 => paypal_ipn_receiver 
    6 => paypal_configuration 
    7 => paypal_payment_button 
    8 => ecommerce_order 
    9 => ecommerce_checkout 
    10 => payment_gateway 
    11 => payment_gateway_dps 
    12 => payment_gateway_sagepay 
    13 => payment_gateway_esec 


However step_03 is meant to finish by saying "ASSET TYPES CACHED", eg:

    ------------------------------------
    Installing Package_Manager_TRIM:
    ------------------------------------
    0 => cron_job_update_trim_record 
    1 => form_action_trim_submit 
    2 => trim_connector 
    3 => trim_saved_search 
------------------------------------
ASSET TYPES CACHED
------------------------------------</pre><br />

There must be some kind of error being printed to a logfile somewhere, but I can't see any relevant error in the Matrix error.log. Is it possible for you to do the fresh install again, but this time invoke step_03.php with strace, and upload the output?

This will probably result in an ~150MB file, but we probably only need the last bit of the output, eg:

    
    strace -s100 -fvo /tmp/strace.out php install/step_03.php $PWD
    tail -n5000 /tmp/strace.out |gzip > strace-snippet.out.gz


If you could upload the resulting gzipped text file then we can see what is going on in step_03.php just before it is dying.

Cheers,
Dan.

(Benjamin Pearson) #13

[quote]
Hrm, it looks like everything is going fairly smoothly except that step_03.php doesn't complete properly. From the log files it seems to stop after getting half-way through the installation of the ecommerce package.

[/quote]



It could be the ecommerce package is failing because of a missing PEAR package HTTP-Client. Hope that helps.


(Arekczer) #14

[quote]
Other information which may help:



PEAR INSTALLED PACKAGES

    Installed packages, channel pear.php.net:
    =========================================
    Package          Version State
    Archive_Tar      1.3.3   stable
    Console_Getopt   1.2.3   stable
    DB               1.7.13  stable
    Mail             1.2.0   stable
    Mail_Mime        1.7.0   stable
    PEAR             1.9.0   stable
    Structures_Graph 1.0.2   stable
    Text_Diff        1.1.1   stable
    XML_HTMLSax      2.1.2   stable
    XML_Parser       1.3.2   stable
    XML_Util         1.2.1   stable

[/quote]

Hi,

You also don’t have:

Text_Diff

Net_URL

HTTP_Request

HTTP_Client

MDB2



Full list of required php and pear modules you have here.



Regards

Arek


(Agibson) #15

[quote]
Hi,

You also don’t have:

Text_Diff

Net_URL

HTTP_Request

HTTP_Client

MDB2



Full list of required php and pear modules you have here.



Regards

Arek

[/quote]



Thanks Arek, I’ve got Text_Diff, but as you point out, dont have the others installed. I read the second list of pear libraries as only being required if I am using the SSV modules, which I didn’t plan to.



I will install all the PEAR libraries and try again. I am currently having an issue with ‘pear install’ doesn’t seem to be installing as expected, but that is another topic :slight_smile: I am not an expert with PEAR, and when running ‘pear install Net_URL’, it seems to download the tar file, but doesn’t come up in the ‘pear list’ list.??



Thanks for your input.


(Arekczer) #16

[quote]
Thanks Arek, I've got Text_Diff, but as you point out, dont have the others installed. I read the second list of pear libraries as only being required if I am using the SSV modules, which I didn't plan to.



I will install all the PEAR libraries and try again. I am currently having an issue with 'pear install' doesn't seem to be installing as expected, but that is another topic :slight_smile: I am not an expert with PEAR, and when running 'pear install Net_URL', it seems to download the tar file, but doesn't come up in the 'pear list' list.??



Thanks for your input.

[/quote]

Hi,



If you have Net_URL tgz file on disk you can install with this command:



As a root:

    
    # pear install /path/to/net_url.tgz


as a user:
    
    $ sudo pear install /path/to/net_url.tgz


Regards
Arek

(Benjamin Pearson) #17

[quote]
I read the second list of pear libraries as only being required if I am using the SSV modules, which I didn't plan to.

[/quote]



Further down, it says "Version 3.20.0 and later MySource Matrix version 3.20.0 and later requires the following PEAR module versions (or later): HTTP_Client 1.1.1 (minimum), 1.2.1 (tested and recommended) and Net_URL 1.0.15"


(Agibson) #18

Hello All,


Just to report that I have successfully installed MySourceMatrix. In the end is was the missing PEAR modules written lower on that page. I had to fix some issues with PEAR, and also had to install the I18N_UnicodeNormalizer component. So my final list of PEAR modules are:

    
    Installed packages, channel pear.php.net:
    =========================================
    Package                Version State
    Archive_Tar            1.3.2   stable
    Console_Getopt         1.2.3   stable
    DB                     1.7.13  stable
    HTTP_Client            1.2.1   stable
    HTTP_Request           1.4.4   stable
    I18N_UnicodeNormalizer 1.0.0   stable
    Image_Color            1.0.4   stable
    Mail                   1.2.0   stable
    Mail_Mime              1.7.0   stable
    Mail_Queue             1.2.3   stable
    Net_Socket             1.0.9   stable
    Net_URL                1.0.15  stable
    Numbers_Roman          1.0.2   stable
    PEAR                   1.7.1   stable
    Structures_Graph       1.0.2   stable
    Text_Diff              1.1.1   stable
    XML_HTMLSax            2.1.2   stable
    XML_Parser             1.3.2   stable


Thankyou everyone for the help.!

(Dan Simmons) #19

No worries. Glad you got it working :slight_smile:


(Duds) #20

Ohhhhh so much of this thread is familliar. I’ve been through all this stuff with missing PEAR and PECL… but I am also still stuck on the write permission problem with the log file.


I’m on OpenSuse 11.2… I have a lot of experience with going Matrix back to version 3.8… but this is the single most difficult installation so far. That includes versions where all the missing stuff had to be built from source. :frowning:



[edit]



OK solved the log file… now I have the same SYS0320 as I’ve seen mentioned elsewhere here.



Already spent 3 hours trawling through code trying to trace it. No joy… :confused: