Upgrade 7.9.14 to 7.10 fails when uploading file

When I try to upload it starts the process like it is uploading.
It never allows you to go to next.
But , it shows the 7.10 in the box under The following upgrade packages have been installed: header
At that point you cannot move forward.

I get this in the error log.

[Fri Feb 23 18:51:03 2018] [error] [client 192.168.101.10] PHP Warning: Declaration of ListViewPackages::setup($data, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’) should be compatible with ListViewDisplay::setup($seed, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’, $id = NULL) in /var/www/html/suitecrm/ModuleInstall/PackageManager/ListViewPackages.php on line 42, referer: http://192.168.101.55/suitecrm/index.php?module=Administration&action=index
[Fri Feb 23 18:51:20 2018] [error] [client 192.168.101.10] PHP Warning: Declaration of ListViewPackages::setup($data, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’) should be compatible with ListViewDisplay::setup($seed, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’, $id = NULL) in /var/www/html/suitecrm/ModuleInstall/PackageManager/ListViewPackages.php on line 42, referer: http://192.168.101.55/suitecrm/index.php?module=UpgradeWizard&action=index

I would start by checking your php.ini to see if you can put more generous values for these parameters:

max_execution_time
memory_limit
max_upload_size

Then about your particular error, you can go to this line in this file

https://github.com/salesagility/SuiteCRM/blob/master/ModuleInstall/PackageManager/ListViewPackages.php#L72

and add “, $id=NULL” to the end of the parameter list, so that line becomes like this

 function setup($data, $file, $where, $params = Array(), $offset = 0, $limit = -1, $filter_fields = Array(), $id_field = 'id', $id=NULL) {

Then come back here and tell me if it works, so I can fix it for everybody. Thanks

Still getting an error;

[error] [client 192.168.101.10] PHP Warning: Declaration of ListViewPackages::setup($data, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’) should be compatible with ListViewDisplay::setup($seed, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’, $id = NULL) in /var/www/html/suitecrm/ModuleInstall/PackageManager/ListViewPackages.php on line 42, referer: http://192.168.101.55/suitecrm/index.php

here is my current code in the module:

 /**
     * Override the setup method in ListViewSmarty since we are not passing in a bean
     *
     * @param data  the data to display on the page
     * @param file  the template file to parse
     */
    function setup($data, $file, $where, $params = Array(), $offset = 0, $limit = -1, $filter_fields = Array(), $id_field = 'id'){
        $this->data = $data;
        $this->tpl = $file;
    }

PHP 7.0.27

Current paramters
memory_limit = 256M
upload_max_size = 2G
max_execution_time = 30

It upgraded from 7.7 to 7.9.14 without this issue

Thanks

LW

It doesn’t look like you added the

, $id=NULL

at the end of the parameter list, can you check that please?

About your php.ini options, I suggest

memory_limit —> 512MB if your hosting allows, or if you’re self-hosting
upload_max_size —> I normally just make this big enough for the upgrade packages, currently around 12MB (2 GB is crazy here)
max_execution_time —> 60 seconds is better, also because of the upgrades, and occasioally I’ve had to make it even more for some specific long-running operation

It still stops.
Something is getting uploaded to the cache:

pwd
/var/www/html/suitecrm/cache/upgrades/temp
[root@lenny temp]# ls -l
total 20
drwxrws—. 4 apache apache 4096 Feb 25 13:52 9nTh0u
drwxrws—. 2 apache apache 4096 Feb 25 13:52 CQ0YQi
drwxrws—. 2 apache apache 4096 Feb 25 13:51 E1WUls
drwxrws—. 4 apache apache 4096 Feb 25 13:51 TO2sfe
-rw-r–r--. 1 apache apache 178 Feb 25 13:52 upgrade_progress.php

Diff new vs old code

< function setup($data, $file, $where, $params = Array(), $offset = 0, $limit = -1, $filter_fields = Array(), $id_field = ‘id’, $id=NULL) {

function setup($data, $file, $where, $params = Array(), $offset = 0, $limit = -1, $filter_fields = Array(), $id_field = 'id'){

/var/log/httpd/error_log
[Sun Feb 25 13:52:12 2018] [error] [client 192.168.101.10] PHP Warning: Declaration of ListViewPackages::setup($data, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’) should be compatible with ListViewDisplay::setup($seed, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’, $id = NULL) in /var/www/html/suitecrm/ModuleInstall/PackageManager/ListViewPackages.php on line 42, referer: http://192.168.101.55/suitecrm/index.php
(END)

Thanks

Oh, I get it (I think).

This is an error in the upgrade process, so we’re probably changing the wrong file, the one that’s already there, not the one that is about to be installed (somewhere inside the zip).

Maybe a better approach for now is simply to turn of PHP Strict standard errors, or error_reporting, or display_errors, so it just installs.

php.ini

; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = Off

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
; Off = Do not display any errors
; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
; On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off

I get the same result. The only difference is that there is nothing in the /var/log/httpd/error_log file saying what happened.

There are files in the /cache/upgrade/tmp directory.

The screen says the file has been installed but it is stuck and wants you to upload a file again.

THX

LW

Can you try deleting (or just renaming, for now) the upload/upgrades directory? There might be some left-overs from previously failed operations that are complicating things.

And then retry the upgrade and check upgradeWizard.log for errors.

I tried that several time over the weekend.

I did it again and got the same result:

[Mon Feb 26 12:25:21 2018] [error] [client 192.168.101.10] PHP Warning: Declaration of ListViewPackages::setup($data, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’) should be compatible with ListViewDisplay::setup($seed, $file, $where, $params = Array, $offset = 0, $limit = -1, $filter_fields = Array, $id_field = ‘id’, $id = NULL) in /var/www/html/suitecrm/ModuleInstall/PackageManager/ListViewPackages.php on line 42, referer: http://192.168.101.55/suitecrm/index.php

Is there some way to run the upgrade from the command line?

Or to do a fresh install and run any database update queries against my current data.

THX

Exactly in which log is that error appearing? And did you check upgradeWizard.log?

I would try one more thing first:

Edit the file ModuleInstall/PackageManager/ListViewPackages.php inside the zip file before installing, to make tha $id=NULL fix (assuming there is such a file in there)

I tried that on a linux and windows workstation.
Unzip the upgrade.
Find the file.
Edit the file.
zip the file on linux or send to compressed zip folder on windows.

Both give a zip error when you try to do the upload.
The zip file gets to the upload directory but nothing gets to cache.

ZIP Error(0): Status(9): Arhive(upload://SuiteCRM-Upgrade-7.9.x-to-7.10.zip): Directory(/var/www/html/suitecrm/cache/upgrades/temp/G9kkQN)

THX

I ran through it again.
Fresh download.
Edited the line.
New zip.
Success.

That fixed it.

I must have been suffering from RCI when I made the first two zip files.

Thank you for all the help.

LW

What a relief, I was running out of ideas to help you.

:slight_smile:

I opened a PR to fix this for good: https://github.com/salesagility/SuiteCRM/pull/5341

That will help everyone else for sure.

Thanks again.