Upgrading Concrete5 and new installation has different src files???
Permalink
Concrete5 7.5.8 was running on an old PHP 5.6 server. Using System & Settings/Update concrete5, I successfully upgraded to 5.7.5.13. I then successfully upgraded to 8, and System & Settings/Environment/Environment Information shows Core Version - 8.2.1, Version Installed - 8.2.1, and Database Version - 20170802000000.
I then made a copy of the entire site and backed up the database and copied both to another server running PHP7.3. Upon accessing it via a browser, I get a fatal error as /var/www/concrete5/concrete/src/Foundation/ClassLoader.php attempts to use Concrete\Core\Foundation\Object, and the class name called "Object" and it is not longer allowed with PHP.
So, then I downloaded latest version of Concrete5 (8.5.1) as well as 8.2.1, and created a new installation and didn't get these errors. So, I look at the file which gave me the previous error, and it is a different file! Also, performing diff on the two results in thousands of differences.
What am I missing? Thanks
I then made a copy of the entire site and backed up the database and copied both to another server running PHP7.3. Upon accessing it via a browser, I get a fatal error as /var/www/concrete5/concrete/src/Foundation/ClassLoader.php attempts to use Concrete\Core\Foundation\Object, and the class name called "Object" and it is not longer allowed with PHP.
So, then I downloaded latest version of Concrete5 (8.5.1) as well as 8.2.1, and created a new installation and didn't get these errors. So, I look at the file which gave me the previous error, and it is a different file! Also, performing diff on the two results in thousands of differences.
What am I missing? Thanks
Not out of the woods. Evidently 8.2.1 is not compatible with PHP7.
PHP Fatal error: Cannot use Concrete\Core\Foundation\Object as Object because 'Object' is a special class name in /var/www/concrete5/concrete/src/Asset/AssetList.php on line 4
PHP Fatal error: Cannot use Concrete\Core\Foundation\Object as Object because 'Object' is a special class name in /var/www/concrete5/concrete/src/Asset/AssetList.php on line 4
Okay, I will try the command line....
$ ./concrete/bin/concrete5 c5:update
** Executing migration: 20180904165911
Refreshing schema for Concrete\Core\Entity\Express\Entry...
Refreshing schema for Concrete\Core\Entity\User\User...
Refreshing schema for Concrete\Core\Entity\Express\Control\AuthorControl...
Refreshing schema for Concrete\Core\Entity\Express\Control\Control...
In AbstractMySQLDriver.php line 115:
An exception occurred while executing 'ALTER TABLE ExpressFormFieldSetAuthorControls ADD CONSTRAINT FK_CF378786BF396750 FOREIGN KEY (id) REFERENCES ExpressFormFieldSetControls (id) ON DELETE CASCADE':
SQLSTATE[HY000]: General error: 1005 Can't create table `concrete5`.`ExpressFormFieldSetAuthorControls` (errno: 150 "Foreign key constraint is incorrectly formed")
In PDOConnection.php line 106:
SQLSTATE[HY000]: General error: 1005 Can't create table `concrete5`.`ExpressFormFieldSetAuthorControls` (errno: 150 "Foreign key constraint is incorrectly formed")
In PDOConnection.php line 104:
SQLSTATE[HY000]: General error: 1005 Can't create table `concrete5`.`ExpressFormFieldSetAuthorControls` (errno: 150 "Foreign key constraint is incorrectly formed")
c5:update [--env ENV] [--allow-as-root] [--rerun] [-a|--after AFTER] [-s|--since SINCE]
$ ./concrete/bin/concrete5 c5:update
** Executing migration: 20180904165911
Refreshing schema for Concrete\Core\Entity\Express\Entry...
Refreshing schema for Concrete\Core\Entity\User\User...
Refreshing schema for Concrete\Core\Entity\Express\Control\AuthorControl...
Refreshing schema for Concrete\Core\Entity\Express\Control\Control...
In AbstractMySQLDriver.php line 115:
An exception occurred while executing 'ALTER TABLE ExpressFormFieldSetAuthorControls ADD CONSTRAINT FK_CF378786BF396750 FOREIGN KEY (id) REFERENCES ExpressFormFieldSetControls (id) ON DELETE CASCADE':
SQLSTATE[HY000]: General error: 1005 Can't create table `concrete5`.`ExpressFormFieldSetAuthorControls` (errno: 150 "Foreign key constraint is incorrectly formed")
In PDOConnection.php line 106:
SQLSTATE[HY000]: General error: 1005 Can't create table `concrete5`.`ExpressFormFieldSetAuthorControls` (errno: 150 "Foreign key constraint is incorrectly formed")
In PDOConnection.php line 104:
SQLSTATE[HY000]: General error: 1005 Can't create table `concrete5`.`ExpressFormFieldSetAuthorControls` (errno: 150 "Foreign key constraint is incorrectly formed")
c5:update [--env ENV] [--allow-as-root] [--rerun] [-a|--after AFTER] [-s|--since SINCE]
The safest upgrade path is usually to 5.7.5.13 then 8.latest, so 8.5.1. Intermediate 8.x cores had many issues with updates.
I suggest you restore to 5.7.5.13 from a backup, then replace the /concrete dir with that from 8.5.1, then run the update from the cli.
I suggest you restore to 5.7.5.13 from a backup, then replace the /concrete dir with that from 8.5.1, then run the update from the cli.
Thanks John,
I ended up getting past the intimidate problem by changing all utf8 table/column collations to utf8mb4, but still get the below warning. Will your recommend approach fix this issue, or will this still be an issue and I should turn off warnings?
Whoops \ Exception \ ErrorException (E_WARNING)
Use of undefined constant LANGUAGE - assumed 'LANGUAGE' (this will throw an Error in a future version of PHP)
I ended up getting past the intimidate problem by changing all utf8 table/column collations to utf8mb4, but still get the below warning. Will your recommend approach fix this issue, or will this still be an issue and I should turn off warnings?
Whoops \ Exception \ ErrorException (E_WARNING)
Use of undefined constant LANGUAGE - assumed 'LANGUAGE' (this will throw an Error in a future version of PHP)
False alarm. A theme package was the culprit. If there are no errors and everything is working, think I still need to go the 5.7.5.13 to 8.5.1 route?
"I suggest you restore to 5.7.5.13 from a backup, then replace the /concrete dir with that from 8.5.1, then run the update from the cli."
Resulted in following error:
.
Goeing to 5.7.5.13 to 8.2.1 to 8.5.1, however, worked.
Resulted in following error:
Creating single page at /account/messages... In Single.php line 157: Argument 2 passed to Concrete\Core\Page\Single::createPageInTree() must implement interface Concrete\Core\Site\Tree\TreeInterface, null given, called in /var/www/photos/concrete/src/Backup/ContentImporter/Importer/Routine/ImportS inglePageStructureRoutine.php on line 42 and defined c5:update [--env ENV] [--allow-as-root] [--rerun] [-a|--after AFTER] [-s|--since SINCE] -sh-4.1$
Goeing to 5.7.5.13 to 8.2.1 to 8.5.1, however, worked.
[michael@vps concrete5]# cat /var/www/concrete5/application/config/update.php
<?php
return array(
'core' => 'concrete5-8.2.1_remote_updater',
);
So, I renamed /var/www/concrete5/concrete to /var/www/concrete5/concrete.deleteme, moved /var/www/concrete5//updates/concrete5-8.2.1_remote_updater/concrete to /var/www/concrete5/concrete, and removed the array element from /var/www/concrete5/application/config/update.php, and all seems good. Really? Is this the way I should have done this?