Upgrade from 3.16.6 to 3.18.2

Hi I am trying to upgrade from 3.16.7 to 3.18.2, and I am having the following strange problem:


when i run step02.php, nothing happens.



the exit code (errorlevel) is 255.



Any ideas what is going on please?

Can you post the exact output you are getting please, and the command you are running.

apparently i found what is happening.


A misconfiguration on postgres was prohibiting db connection. However, one of the step02 include files (mysource_matrix/core/include/mysource.inc) apparently when it reports an error, it assumes that it's running on webserver, not CLI, and as a result, no error message is printed out…


You need to check that you're running the PHP CLI binary, not CGI binary. If you run php -v you should get an output similar to this:

    PHP 5.2.4-2ubuntu5.1 with Suhosin-Patch 0.9.6.2 (cli) (built: May  9 2008 16:34:16) 
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies


Notice the (cli) on the first line. If yours says (cgi), that's why you're not seeing the errors properly.

I wasusing the CLI version.


I started upgrade from scratch, and i am getting the following error first time i run step02.php



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

| PHP Warning |

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

| File : /CMS/TRAIN/mysource_matrix/core/lib/DAL/DAL.inc |

| Line : 1575 |

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

| DAL::require_once(/CMS/TRAIN/mysource_matrix/core/lib/DAL/Oven/core/coreQueries.inc): failed to open stream: No such file or directory |

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



i CHECK Oven directory, and it's empty.



then when i run it the 2nd time, the following are logged in the error log:



#2 /CMS/TRAIN/mysource_matrix/install/step_02.php(92): install_stored_relations('functions')

#3 {main}

thrown in /CMS/TRAIN/mysource_matrix/core/lib/DAL/DAL.inc on line 878

[24-Jun-2008 09:32:22] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42501]: Insufficient privilege: 7 ERROR: must be owner of function sq_grant_access' in /CMS/TRAIN/mysource_matrix/core/lib/DAL/DAL.inc:878

Stack trace:

#0 /CMS/TRAIN/mysource_matrix/core/lib/DAL/DAL.inc(878): PDO->exec('-- creates a fu…')

#1 /CMS/TRAIN/mysource_matrix/core/lib/db_install/db_install.inc(799): DAL::executeSql('-- creates a fu…')

#2 /CMS/TRAIN/mysource_matrix/install/step_02.php(92): install_stored_relations('functions')

#3 {main}

thrown in /CMS/TRAIN/mysource_matrix/core/lib/DAL/DAL.inc on line 878

Ok… I solved this problem… was because I had changed the matrix user.


Now I have a new problem…



If I access the backend using a url for which there is a website defined, The asset map doesn't load, and in the source I can find the following error:



<b>Fatal error</b>: Uncaught exception 'Exception' with message 'Unable to adjust real sort order for majorid: 1 due to database error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: &quot;&quot;' in /CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc:230

Stack trace:

#0 /CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc(445): Asset_Map-&gt;_getInitialLineageSelection('complex')

#1 /CMS/TRAIN/mysource_matrix/core/include/backend.inc(1151): Asset_Map-&gt;embedAssetMap('complex', 275)

#2 /CMS/TRAIN/mysource_matrix/core/include/backend.inc(185): Backend-&gt;_printSideNav()

#3 /CMS/TRAIN/mysource_matrix/core/include/mysource.inc(368): Backend-&gt;paint()

#4 /CMS/TRAIN/mysource_matrix/core/web/index.php(30): MySource-&gt;start()

#5 {main}

thrown in <b>/CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc</b> on line <b>230</b><br />

Maybe this will help… postgres log shows the following:


invalid input syntax for integer: ""

STATEMENT: SELECT count(*) FROM sq_ast_lnk

WHERE majorid = $1

AND sort_order < $2

AND link_type > 2

Any idea about this problem?

We have been unable to reproduce the problem here on any database/computer config, but by looking at the error message you provided, can I ask you to make some changes to your system to see if it fixes the problem?

  1. Open file located at /CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc
  2. Change lines 226-227 from:
    MatrixDAL::bindValueToPdo($query, 'previd', $previd);
    MatrixDAL::bindValueToPdo($query, 'sort_order', $sort_order);


To read:
    MatrixDAL::bindValueToPdo($query, 'previd', $previd, PDO::PARAM_STR);
    MatrixDAL::bindValueToPdo($query, 'sort_order', $sort_order, PDO::PARAM_INT);


3. Save changes and see if the problem is still happening

And can you let us know if this does correct the problem or not?

Thanks,
Ben

Hi Ben,

[quote]We have been unable to reproduce the problem here on any database/computer config, but by looking at the error message you provided, can I ask you to make some changes to your system to see if it fixes the problem?


  1. Open file located at /CMS/TRAIN/mysource_matrix/core/lib/asset_map/asset_map.inc
  2. Change lines 226-227 from:
    MatrixDAL::bindValueToPdo($query, 'previd', $previd);
    MatrixDAL::bindValueToPdo($query, 'sort_order', $sort_order);


To read:
    MatrixDAL::bindValueToPdo($query, 'previd', $previd, PDO::PARAM_STR);
    MatrixDAL::bindValueToPdo($query, 'sort_order', $sort_order, PDO::PARAM_INT);


3. Save changes and see if the problem is still happening

And can you let us know if this does correct the problem or not?

Thanks,
Ben[/quote]

I've been having the same issue/error (reported to Squiz UK a couple of weeks ago) I've tried it and it doesn't seem to work. I'm sure that the UK folks could pass on the login details (or I can give you them) if you wanted to debug the issue on machine exhibiting the errors...

K

That would be great. Could you PM me the details, or email me at: gsherwood at squiz dot net