[details=“Support into”]
Nexcloud version 25.0.3
Opertaing system Ubuntu 20.04
Apache 2.4.41
PHP 7.4, 8.1, 8.2 ← Yes, really.
I am attempting to migrate to a new server. The existing install uses PHP 7.4. The new install requires PHP >8.0. I have 8.1 and 8.2 installed. I have copied over my data folder and database.
Following the manual install guide, when I enter the nextcloud directory for the latest version, I switch to either PHP 8.1 or 8.2. It doesn’t matter. Running “php occ” results in an error:
php occ
An unhandled exception has been thrown:
Error: Class “Symfony\Component\HttpFoundation\IpUtils” not found in /var/www/html/nextcloud/lib/private/AppFramework/Http/Request.php:574
Stack trace:
#0 /var/www/html/nextcloud/lib/private/AppFramework/Http/Request.php(866): OC\AppFramework\Http\Request->isTrustedProxy()
#1 /var/www/html/nextcloud/lib/private/AppFramework/Http/Request.php(794): OC\AppFramework\Http\Request->fromTrustedProxy()
#2 /var/www/html/nextcloud/lib/base.php(793): OC\AppFramework\Http\Request->getInsecureServerHost()
#3 /var/www/html/nextcloud/lib/base.php(1157): OC::init()
#4 /var/www/html/nextcloud/console.php(48): require_once(‘…’)
#5 /var/www/html/nextcloud/occ(11): require_once(‘…’)
#6 {main}
I do not get this error in under nextcloud.old using PHP 7.4. I have searched for a helpful reference but I am stuck. What is missing?
Any help is appreciated. Thank you.
Progress sort of. Composer installed the symfony requirements, but now I have something else:
An unhandled exception has been thrown:
TypeError: OCA\Theming\ThemingDefaults::__construct(): Argument #3 ($urlGenerator) must be of type OCP\IURLGenerator, OC\User\Session given, called in /var/www/html/nextcloud/lib/private/Server.php on line 1228 and defined in /var/www/html/nextcloud/apps/theming/lib/ThemingDefaults.php:105
Stack trace:
#0 /var/www/html/nextcloud/lib/private/Server.php(1228): OCA\Theming\ThemingDefaults->__construct()
#1 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(170): OC\Server->OC{closure}()
#2 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}()
#3 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(137): Pimple\Container->offsetGet()
#4 /var/www/html/nextcloud/lib/private/ServerContainer.php(171): OC\AppFramework\Utility\SimpleContainer->query()
#5 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(65): OC\ServerContainer->query()
#6 /var/www/html/nextcloud/lib/private/Server.php(2143): OC\AppFramework\Utility\SimpleContainer->get()
#7 /var/www/html/nextcloud/lib/private/Console/Application.php(67): OC\Server->getThemingDefaults()
#8 /var/www/html/nextcloud/console.php(97): OC\Console\Application->__construct()
#9 {main}
I started again and copied apps over one at a time but with a script and now it works.