Fatal Error on Step2


(Duncan Robertson) #1

Hi, we're installing a new matrix setup and are stuck on Step 2. We're getting the following error:

    Fatal error: Uncaught exception 'Exception' with message 'Could not create database connection: DBError!:SQLSTATE[08006] [7] FATAL:  Ident authentication failed for user "matrix"' in /websites/mysource_matrix/core/include/mysource.inc:2226


Now we've edited our pg_hba.conf file:

[img]http://uploads.screenshot-program.com/upl9105251037.png[/img]

Our DB config file looks like this (we've tried with adding[i] host=db[/i] and [i]host=127.0.0.1[/i] and host=our.ip.address.123:

[img]http://uploads.screenshot-program.com/upl4389409440.png[/img]

The only thing that I can think of that's upsetting this install is the postgresql.conf file. Is there anything I need to modify? My listen address is
    #listen_addresses = 'localhost'


Please help.

(Avi Miller) #2

Obvious questions first: You restarted PostgreSQL after making the pg_hba.conf change? You have created the "matrix" and "matrix_secondary" PostgreSQL users?


The db.inc file is using a socket connection, which is the "local" line in pg_hba.conf. If you add a host to your DSN string, you'd then need to enable PostgreSQL TCP support.


(Duncan Robertson) #3

I started PostgreSQL using
    sudo /etc/init.d/postgresql-8.1 start

I restarted with
    sudo /etc/init.d/postgresql-8.1 restart


Then LOADS of warnings:

    SEQUENCE CREATION COMPLETE
    ------------------------------------
    PHP Warning:  fopen(/websites/mysource_matrix/data/private/logs/error.log): failed to open stream: Permission denied in /websites/mysource_matrix/core/include/general.inc on line 1057
Warning: fopen(/websites/mysource_matrix/data/private/logs/error.log): failed to open stream: Permission denied in /websites/mysource_matrix/core/include/general.inc on line 1057
PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /websites/mysource_matrix/core/include/general.inc on line 1058

Warning: fwrite(): supplied argument is not a valid stream resource in /websites/mysource_matrix/core/include/general.inc on line 1058
PHP Warning:  Error text not found for this code and locale [SYS0051]
array (
  0 => '/websites/mysource_matrix/data/private/logs/error.log',
) in /websites/mysource_matrix/core/include/locale_manager.inc on line 504

Warning: Error text not found for this code and locale [SYS0051]
array (
  0 => '/websites/mysource_matrix/data/private/logs/error.log',
) in /websites/mysource_matrix/core/include/locale_manager.inc on line 504
+--------------------------------------------------------------------------------------------------+
| PHP Warning																					  |
|--------------------------------------------------------------------------------------------------|
| rename(/tmp/string_to_fileoDAlZe,[SYSTEM_ROOT]/data/private/db/sequences.inc): Permission denied |
+--------------------------------------------------------------------------------------------------+
PHP Warning:  fopen(/websites/mysource_matrix/data/private/logs/error.log): failed to open stream: Permission denied in /websites/mysource_matrix/core/include/general.inc on line 1057

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

Warning: fwrite(): supplied argument is not a valid stream resource in /websites/mysource_matrix/core/include/general.inc on line 1058
PHP Warning:  Error text not found for this code and locale [SYS0051]
array (
  0 => '/websites/mysource_matrix/data/private/logs/error.log',
) in /websites/mysource_matrix/core/include/locale_manager.inc on line 504

Warning: Error text not found for this code and locale [SYS0051]
array (
  0 => '/websites/mysource_matrix/data/private/logs/error.log',
) in /websites/mysource_matrix/core/include/locale_manager.inc on line 504
+---------------------------------------------------------+
| MySource Warning										|
|---------------------------------------------------------|
| Error text not found for this code and locale [SYS0010] |
+---------------------------------------------------------+
PHP Warning:  fopen(/websites/mysource_matrix/data/private/logs/error.log): failed to open stream: Permission denied in /websites/mysource_matrix/core/include/general.inc on line 1057

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

Warning: fwrite(): supplied argument is not a valid stream resource in /websites/mysource_matrix/core/include/general.inc on line 1058
PHP Warning:  Error text not found for this code and locale [SYS0051]
array (
  0 => '/websites/mysource_matrix/data/private/logs/error.log',
) in /websites/mysource_matrix/core/include/locale_manager.inc on line 504

Warning: Error text not found for this code and locale [SYS0051]
array (
  0 => '/websites/mysource_matrix/data/private/logs/error.log',
) in /websites/mysource_matrix/core/include/locale_manager.inc on line 504
+------------------------------------------+
| MySource Error						   |
|------------------------------------------|
| TABLE INSTALL FAILURE					|
+------------------------------------------+
sh: /usr/sbin/sendmail: No such file or directory</pre>

(Dan Simmons) #4

The above errors indicate that, in addition to any database connection problems, your web user does not have write permission to the data/cache directories. Additionally, sendmail is not installed (I think it's trying to email you about the errors).


Regarding the database connection problems…



Generally I'd prefer to use a Unix socket if PostgreSQL is installed on the same machine as the webserver. Check your PostgreSQL config file for something similar to:


    unix_socket_directory = '/var/run/postgresql'


And then use a DSN in db.inc like:

    $db_conf = array (
    		'db' => array (
    				'DSN'	  => 'pgsql:dbname=mysource_matrix',
    				'user'	 => 'matrix',
    				'password' => '',
    				'type'	 => 'pgsql',
    			   ),
    ...


Just as a side note, you only need to send Postgres a HUP signal and it will re-read it's configuration files (though I'd generally restart if changing listening addresses etc).

(Duncan Robertson) #5

Ok, I'm not a sysadmin but I consider myself a somewhat intelligent person. But I cannot install Matrix, it's impossible.


I'm on the 12 time trying to install and I'm getting on step 2:


    Fatal error: Uncaught exception 'DALException' with message 'SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "sq_ast_typ" does not exist' in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc:632
    Stack trace:
    #0 /home/websites/mysource_matrix/core/lib/DAL/DAL.inc(908): DAL::executePdoAssoc(Object(PDOStatement), NULL)
    #1 /home/websites/mysource_matrix/core/include/asset_manager.inc(152): DAL::executeSqlAssoc('SELECT type_cod...')
    #2 /home/websites/mysource_matrix/core/include/asset_manager.inc(121): Asset_Manager->getAssetTypes()
    #3 /home/websites/mysource_matrix/core/include/asset_manager.inc(87): Asset_Manager->_loadAssetTypes()
    #4 /home/websites/mysource_matrix/core/include/mysource.inc(214): Asset_Manager->Asset_Manager()
    #5 /home/websites/mysource_matrix/core/include/init.inc(231): MySource->init()
    #6 /home/websites/mysource_matrix/install/step_02.php(57): require_once('/home/websites/...')
    #7 {main}
      thrown in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc on line 632


Please help!

(Arekczer) #6

[quote]Ok, I'm not a sysadmin but I consider myself a somewhat intelligent person. But I cannot install Matrix, it's impossible.


I'm on the 12 time trying to install and I'm getting on step 2:


    Fatal error: Uncaught exception 'DALException' with message 'SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "sq_ast_typ" does not exist' in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc:632
    Stack trace:
    #0 /home/websites/mysource_matrix/core/lib/DAL/DAL.inc(908): DAL::executePdoAssoc(Object(PDOStatement), NULL)
    #1 /home/websites/mysource_matrix/core/include/asset_manager.inc(152): DAL::executeSqlAssoc('SELECT type_cod...')
    #2 /home/websites/mysource_matrix/core/include/asset_manager.inc(121): Asset_Manager->getAssetTypes()
    #3 /home/websites/mysource_matrix/core/include/asset_manager.inc(87): Asset_Manager->_loadAssetTypes()
    #4 /home/websites/mysource_matrix/core/include/mysource.inc(214): Asset_Manager->Asset_Manager()
    #5 /home/websites/mysource_matrix/core/include/init.inc(231): MySource->init()
    #6 /home/websites/mysource_matrix/install/step_02.php(57): require_once('/home/websites/...')
    #7 {main}
      thrown in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc on line 632


Please help![/quote]

Did you try drop DB and restart whole installation (best with extracting mysource source)?
Also in your previously post I found:
    PHP Warning:  fopen(/websites/mysource_matrix/data/private/logs/error.log): failed to open stream: Permission denied in /websites/mysource_matrix/core/include/general.inc on line 1057

Did you set correct rights for files and dirs?

Regards
Arek