Unable to upload upgrade package

I am trying to upgrade to 7.10.1 from 7.10. When I enter the Upgrade wizard, then click on system check, I get the following warning:


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) occurred in /myhome/ModuleInstall/PackageManager/ListViewPackages.php on line 42 [2018-03-10 14:05:45] display_stack_trace caller, file: /myhome/include/utils.php line#: 3533
/myhome/ModuleInstall/PackageManager/ListViewPackages.php[L:42](:StackTraceErrorHandler)
/myhome/ModuleInstall/PackageManager/PackageManagerDisplay.php[L:46](:require_once)
/myhome/modules/UpgradeWizard/upload.php[L:58](:require_once)
/myhome/modules/UpgradeWizard/index.php[L:297](:require)
/myhome/include/MVC/View/SugarView.php[L:807](:include_once)
/myhome/include/MVC/View/views/view.classic.php[L:74](SugarView:includeClassicFile)
/myhome/include/MVC/View/SugarView.php[L:207](ViewClassic:display)
/myhome/include/MVC/Controller/SugarController.php[L:432](SugarView:process)
/myhome/include/MVC/Controller/SugarController.php[L:375](SugarController:processView)
/myhome/include/MVC/SugarApplication.php[L:109](SugarController:execute)
/myhome/index.php[L:52](SugarApplication:execute)

If I select the upgrade package to upload and click to upload it, the screen displays the tool that should indicate upload traffic, but the upload is never completed. After a long time (say, 15 minutes), the tool disappears, but the package is not indicated as being available. It is not, in fact, in the uploads/upgrade directory.

Here is what is NOT causing the problem:

  • poor network connection (I can upload lots of files to the the same server via sftp)
  • permissions on the directories concerned (all are writable)
  • insufficient memory (2 GB available - obviously much too much)
  • limit to file upload size (set to 300MB - obviously much too much)
  • limit to php script execution time (set to 2000 secs - obviously much too much)

So what could it be?

Hi, let’s try to fix that Warning to see if it solves the problem. Please do this change

https://github.com/salesagility/SuiteCRM/pull/5341/files

The irony of it: this bug is solved in 7.10.1, and you can’t upgrade to 7.10.1 because of it… :frowning:

Tell me how this goes.

You can also check upgradeWizard.log to see if there are any clues there.

OK. I patched the file as indicated. The patch apparently uploads correctly, although the following message is displayed:

Warning: stat(): stat failed for upload/upgrades/patch/SuiteCRM-Upgrade-7.10-to-7.10.1-manifest.php occurred in .../include/UploadStream.php on line 308 [2018-03-11 10:28:22] display_stack_trace caller, file: .../include/utils.php line#: 3533
[L:](:StackTraceErrorHandler)
.../include/UploadStream.php[L:308](:stat)
[L:](UploadStream:url_stat)
.../modules/UpgradeWizard/upload.php[L:152](:copy)
.../modules/UpgradeWizard/index.php[L:297](:require)
.../include/MVC/View/SugarView.php[L:807](:include_once)
.../include/MVC/View/views/view.classic.php[L:74](SugarView:includeClassicFile)
.../include/MVC/View/SugarView.php[L:207](ViewClassic:display)
.../include/MVC/Controller/SugarController.php[L:432](SugarView:process)
.../include/MVC/Controller/SugarController.php[L:375](SugarController:processView)
.../include/MVC/SugarApplication.php[L:109](SugarController:execute)
.../index.php[L:52](SugarApplication:execute)

I don’t understand why the message is there, because the file upload/upgrades/patch/SuiteCRM-Upgrade-7.10-to-7.10.1-manifest.php is indeed present.

Next, the following message is displayed:


Upgrade process will update some files but these files also exist in custom/ folder. Please review the changes before continuing:

    include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectContactsButton.php => custom/include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectContactsButton.php
    include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectUsersButton.php => custom/include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectUsersButton.php
    include/language/en_us.lang.php => custom/include/language/en_us.lang.php
    metadata/securitygroups_acl_rolesMetaData.php => custom/metadata/securitygroups_acl_rolesMetaData.php
    metadata/securitygroups_defaultsMetaData.php => custom/metadata/securitygroups_defaultsMetaData.php
    metadata/securitygroups_recordsMetaData.php => custom/metadata/securitygroups_recordsMetaData.php
    modules/Home/language/en_us.lang.php => custom/modules/Home/language/en_us.lang.php
    modules/Leads/language/en_us.lang.php => custom/modules/Leads/language/en_us.lang.php
    modules/Leads/metadata/detailviewdefs.php => custom/modules/Leads/metadata/detailviewdefs.php
    modules/Leads/metadata/editviewdefs.php => custom/modules/Leads/metadata/editviewdefs.php
    modules/Opportunities/metadata/detailviewdefs.php => custom/modules/Opportunities/metadata/detailviewdefs.php
    modules/Prospects/language/en_us.lang.php => custom/modules/Prospects/language/en_us.lang.php
    modules/Prospects/metadata/detailviewdefs.php => custom/modules/Prospects/metadata/detailviewdefs.php
    modules/Prospects/metadata/editviewdefs.php => custom/modules/Prospects/metadata/editviewdefs.php
    modules/Accounts/metadata/detailviewdefs.php => custom/modules/Accounts/metadata/detailviewdefs.php
    modules/ACLRoles/views/view.classic.php => custom/modules/ACLRoles/views/view.classic.php
    modules/Connectors/connectors/sources/ext/rest/insideview/mapping.php => custom/modules/Connectors/connectors/sources/ext/rest/insideview/mapping.php
    modules/Connectors/metadata/searchdefs.php => custom/modules/Connectors/metadata/searchdefs.php
    modules/Contacts/language/en_us.lang.php => custom/modules/Contacts/language/en_us.lang.php
    modules/Contacts/metadata/detailviewdefs.php => custom/modules/Contacts/metadata/detailviewdefs.php
    modules/Contacts/metadata/editviewdefs.php => custom/modules/Contacts/metadata/editviewdefs.php
    modules/Contacts/metadata/SearchFields.php => custom/modules/Contacts/metadata/SearchFields.php

Having no idea at all whether this is normal or not, and how those custom/modules files came to be, I continued.

After the Commit upgrade, in spite of the “Files coped successfully” message, there was a long series of stat failed warnings, similar to the first one (above). But all the files are there. The directories have permissions 755 and the files 644.

The last step in the upgrade resulted in yet another warning:


Warning: exec() has been disabled for security reasons occurred in .../include/utils.php on line 449 [2018-03-11 11:09:43] display_stack_trace caller, file: .../include/utils.php line#: 3533
[L:](:StackTraceErrorHandler)
.../include/utils.php[L:449](:exec)
.../modules/UpgradeWizard/end.php[L:219](:getRunningUser)
.../modules/UpgradeWizard/index.php[L:297](:require)
.../include/MVC/View/SugarView.php[L:831](:include_once)
.../include/MVC/View/views/view.classic.php[L:74](SugarView:includeClassicFile)
.../include/MVC/View/SugarView.php[L:207](ViewClassic:display)
.../include/MVC/Controller/SugarController.php[L:432](SugarView:process)
.../include/MVC/Controller/SugarController.php[L:375](SugarController:processView)
.../include/MVC/SugarApplication.php[L:109](SugarController:execute)
.../index.php[L:52](SugarApplication:execute)

It is indeed true that exec has been disabled. But it is not clear if something has failed and needs to be redone, or if something has failed.
There are NO warnings or errors or mention of failure in the upgrade log.

Bottom line: Things seem to work, although there are a lot of unexplained messages.

“exec” failed is ok, because that part of the code (I wrote it myself) already accounts for that possibility and falls back to a secondary method.

The “stat” problems might be a problem, it’s a failed file access, but if nothing seems broken, I would also ignore it: it is explainable by grabbing a list of files, and then a file getting deleted before a subsequent check is attempted. It’s possible in an upgrade process, I guess.

The other message “Upgrade process will update some files but these files also exist in custom/ folder” should raise your concern. You have files in custom directory, probably the fruit of customizations you (or someone there) did, in Studio or by changing code. What the installer is telling you is that it has new versions of those files to use, but since you have alternatives in the “custom” folder, which take precedence, the new files SuiteCRM is installing won’t be used, which might break things.

So you really should

  • remove those files from custom directory, if they’re not really necessary

or

  • redo those customizations, starting from the newly installed SuiteCRM files, and making similar changes to the ones you have now in “custom”.

Thanks very very much for that feedback. It goes a long way to comforting the neophyte user.
Regarding the customizations, since I have not customized anything myself (in the sense of modifying manually an existing file), the only thing I can think of is that these files were created by a plugin.

-I have no idea about the architecture of SuiteCRM plugins and where they should be installed.

  • If I have installed any, would I see them in the Module Loader?

As you can see, I have been negligent about documenting what I might have added to the plain vanilla SuiteCRM.

Yes, I believe nay plugins should be in the Module Loader, unless they have some non-standard installation method.

You can compare those files, see the difference between the one in “custom” and the other one. Some of those differences are the novelties introduced in the new version, but on the other side of the equation you might find some field names, for example, that might mean something to you (because you’ve seen them on screen).

If it’s a plugin you might want to check with the author if there is a new updated, version, to be compatible with 7.10.