Unable to Upgrade from 7.8.3 to 7.9.5 - Setting error_reporting() to E_ERROR while running upgrade

Hello,

i am not able to upgrade the version 7.8.3 to 7.9.5 with the upgrade package SuiteCRM-Upgrade-7.8.x-to-7.9.5.zip

Mon, 11 Sep 2017 10:01:24 +0200 [UpgradeWizard] - file backup done.
Mon, 11 Sep 2017 10:01:24 +0200 [UpgradeWizard] - Running pre_install()…
Mon, 11 Sep 2017 10:01:24 +0200 [UpgradeWizard] - pre_install() done.
[[15~Mon, 11 Sep 2017 10:02:09 +0200 [UpgradeWizard] - setting session variables…
Mon, 11 Sep 2017 10:02:09 +0200 [UpgradeWizard] - [At commit.php]
Mon, 11 Sep 2017 10:02:09 +0200 [UpgradeWizard] - Setting error_reporting() to E_ERROR while running upgrade

I have checked the file permissions and set chmod recursively to 777 including chmod for the apache user (chmod -R apache:apache suitecrm)

After i start the upgrade process i get the error

Mon, 11 Sep 2017 10:02:09 +0200 [UpgradeWizard] - [At commit.php]
Mon, 11 Sep 2017 10:02:09 +0200 [UpgradeWizard] - Setting error_reporting() to E_ERROR while running upgrade

and i get a blank page in the UpgradeWizard.

How can i upgrade the suitecrm version 7.8.3 ? Anything else i can check / do ?

Please check also php_errors.log

No errors found. Only a warning

[Mon Sep 11 11:40:17 2017] [error] [client 10.64.122.190] PHP Warning: constant(): Couldn’t find constant SUITECRM_PHP_REC_VERSION in /var/www/suitecrm/modules/UpgradeWizard/preflight.php on line 318, referer: http://crm.ede.de/suitecrm/index.php?module=Administration&action=index

What is your PHP version? And database version?

PHP Version 5.6.24
MariaDB 5.5.57

It’s strange that that constant is missing.

Can you check if the files in your system seem to look like this?

https://github.com/salesagility/SuiteCRM/search?utf8=✓&q=SUITECRM_PHP_REC_VERSION&type=

Maybe there were changes between your version, and what you see there. But at least it can give you clues as to where the constant was defined.

If I were you, I would also try removing that line to see if it makes a difference. So where you see this


	if(check_php_version() === 0){
		$php_suggested_ver=$mod_strings['LBL_CURRENT_PHP_VERSION'].phpversion().". ".$mod_strings['LBL_RECOMMENDED_PHP_VERSION_1'].constant('SUITECRM_PHP_REC_VERSION').$mod_strings['LBL_RECOMMENDED_PHP_VERSION_2'];
	}

Turn into something like this:


	if(check_php_version() === 0){
//		$php_suggested_ver=$mod_strings['LBL_CURRENT_PHP_VERSION'].phpversion().". ".$mod_strings['LBL_RECOMMENDED_PHP_VERSION_1'].constant('SUITECRM_PHP_REC_VERSION').$mod_strings['LBL_RECOMMENDED_PHP_VERSION_2'];
                $php_suggested_ver='I have no suggestions to make.';
	}

That is just a message to the user; if you remove it you won’t break the install, and since it seems to be buggy, you moght solve your problem.

Hi,
at first i would to say thank your help!

I have checked the filesystem

  • php_version.php does not exists
  • install/old_php.php does not exists
  • modules/UpgradeWizard/preflight.php looks like the file you linked
  • install.php i cant find the the string SUITECRM_PHP_REC_VERSION in the file
  • include/utils.php seems ok
  • modules/UpgradeWizard/uw_utils.php seems ok

I have created the file php_version.php with the code you have posted with github and restart the upgrade process. It appears the same error. Any suggestions?

Can you please check upgradeWizard.log and tell me if you see any ERROR or FATAL messages there?

EDIT: sorry, you already posted errors from that log. I meant suitecrm.log

There are no ERROR / FATAL messages.

If upgradeWizard.log is still complaining about the missing constant, please try commenting out that line as I suggested above.

The log entry was not in the upgradeWizard.log. It was in the apache log. I have commenting it out. But nothing changes.

After this log lines

(…)
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/include/DetailView/DetailView2.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/include/Dashlets/Dashlet.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/download.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/data/SugarBean.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/data/Relationships/RelationshipFactory.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/data/Link2.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/cron.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/README.md
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/ModuleInstall/PackageManager/PackageManagerDisplay.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Backing up file: /var/www/suitecrm_isa_test/ModuleInstall/ModuleInstaller.php
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - file backup done.
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - Running pre_install()…
Fri, 15 Sep 2017 10:46:22 +0200 [UpgradeWizard] - pre_install() done.

The lines

Fri, 15 Sep 2017 10:47:01 +0200 [UpgradeWizard] - [At commit.php]
Fri, 15 Sep 2017 10:47:01 +0200 [UpgradeWizard] - Setting error_reporting() to E_ERROR while running upgrade

are displayed

After i rename upgrade_progress.php to upgrade_progress.php.old the upgrade wizard works again… but with the same error.

Can you try increasing these values in your php.ini?

max_execution_time
memory_limit

max_execution_time = 6000
memory_limit = 256M

You can try 512 for memory_limit.

You can try clearing (or better: renaming) the upload/upgrades folder to make sure everything starts from scratch the next time you try the upgrade.

Other than that, I’m running out of ideas.

Sometimes it’s weird permissions issues, caused by .htaccess files or something.

Sometimes you can solve this kind of thing by simply trying upgrades on your DB, your PHP, etc. But it would be better if you tried it on a clone of your system so you don’t take risks.

I have deleted the upload/upgrades folder and the upgrade process started from zero. The same error appears after starting the installation.

Sorry, I can’t figure out what could be wrong. Sometimes it’s simpler to just give up and move forward to change some components and see if the error disappears.

This could be upgrading PHP to 7.0 for example, or even migrating to a new system.

Anyone got a little further than this? I have e-x-a-c-t-l-y the same issue and followed all the steps you suggested and nothing helped. I was upgrading from 7.6.6 to 7.8.3 which worked. After upgrading to 7.11.5 I got white screen and so on …

@luggie I would prefer if you open a separate thread with your own issue and all the details you can get.

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/18836-guidelines-to-post-in-these-forums

White screens are always accompanied by useful messages in your logs, please check those. Thanks