EditDomain error - WARNING: Undefined array key "php" Hooks.php

Description

When editing a domain from the CLI, I get the following error:

]# EditDomain --reset site105
WARNING: Undefined array key "php" 
[/usr/local/apnscp/lib/Util/Account/Hooks.php:118]
         0. Util_Account_Hooks->_process("edit", )
            [/usr/local/apnscp/lib/Util/Account/Hooks.php:50]
         1. Util_Account_Hooks->run("edit")
            [/usr/local/apnscp/lib/Opcenter/Account/Edit.php:144]
         2. Opcenter\Account\Edit::Opcenter\Account\{closure}("service.success", Opcenter\SiteConfiguration)
            [/usr/local/apnscp/lib/Event/Cardinal.php:143]
         3. Event\Contracts\Subscriber@anonymous/usr/local/apnscp/lib/Event/Cardinal.php:132$a1->update("service.success", Opcenter\SiteConfiguration)
            [/usr/local/apnscp/lib/Event/Manager.php:187]
         4. Event\Manager->fire("service.success", Opcenter\SiteConfiguration)
            [/usr/local/apnscp/lib/Event/Cardinal.php:172]
         5. Event\Cardinal::fire(["service", "success"], Opcenter\SiteConfiguration)
            [/usr/local/apnscp/lib/Opcenter/Account/Edit.php:155]
         6. Opcenter\Account\Edit->installServices()
            [/usr/local/apnscp/lib/Opcenter/Account/Edit.php:88]
         7. Opcenter\Account\Edit->exec()
            [/usr/local/apnscp/bin/EditDomain:119]

Expected Behavior

Describe what you expected to happen when the bug occurred.

Actual Behavior

Describe what actually happened when the bug occurred.

Environment

ApisCP version:
revision: ca92487ad55c94763dc5ee86356589136e86246e
timestamp: 1762907856
ver_maj: 3
ver_min: 2
ver_patch: 48
ver_pre: ā€˜ā€™
dirty: false
debug: false

Operating System:
5.4.302-1.el8.elrepo.x86_64

Site was provisioned on edge or modified on edge, then flipped to major. 3.2.49 introduces a new php service. Safely ignore for now.

I’m trying to edit the domain because the PHP Pools page has a 500 error.


		Php_Module::pool_info(): Argument #1 ($pool) must be of type string, array given, called in /usr/local/apnscp/lib/Module/Skeleton/Standard.php on line 146 (View: /usr/local/apnscp/config/custom/apps/php-pools/views/index.blade.php) (View: /usr/local/apnscp/resources/views/partials/app/content.blade.php) (View: /usr/local/apnscp/resources/views/partials/app/content.blade.php) (View: /usr/local/apnscp/resources/views/partials/app/content.blade.php)

No users can modify their PHP Pools and most PHP sites have a 503 error.

This server was not on Edge.

~]# upcp
Updating to v3.2.48
Previous HEAD position was 45fade15e FIX: get_user()- extraneous call to normalize_path() produces excessive error diagnostic (web)
HEAD is now at daed3b835 CHG: bump (migrations)
/usr/local/apnscp/lib/modules/surrogates /usr/local/apnscp ~
/usr/local/apnscp ~
Compiled services and packages files removed!
Job for apnscp.service failed because the control process exited with error code.
See "systemctl status apnscp.service" and "journalctl -xe" for details.
Nothing to migrate.
Nothing to migrate.
Updating to v3.2.48.1
Previous HEAD position was daed3b835 CHG: bump (migrations)
HEAD is now at 908e8a14c CHG: bump (migrations)
/usr/local/apnscp/lib/modules/surrogates /usr/local/apnscp /usr/local/apnscp ~
/usr/local/apnscp /usr/local/apnscp ~
Compiled services and packages files removed!
Job for apnscp.service failed because the control process exited with error code.
See "systemctl status apnscp.service" and "journalctl -xe" for details.
Nothing to migrate.
Nothing to migrate.
Updating to v3.2.48.2
Previous HEAD position was 908e8a14c CHG: bump (migrations)
HEAD is now at 242aa3512 FIX: full certificate chain is required for deep inspection (Let's Encrypt) CHG: get_certificate()- when $name is omitted, the full certificate including chain is returned (ssl)
/usr/local/apnscp/lib/modules/surrogates /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp ~
/usr/local/apnscp /usr/local/apnscp /usr/local/apnscp ~
Compiled services and packages files removed!
Job for apnscp.service failed because the control process exited with error code.
See "systemctl status apnscp.service" and "journalctl -xe" for details.
Nothing to migrate.
Nothing to migrate.
Updating to v3.2.48.3
Previous HEAD position was 242aa3512 FIX: full certificate chain is required for deep inspection (Let's Encrypt) CHG: get_certificate()- when $name is omitted, the full certificate including chain is returned (ssl)
HEAD is now at 50eca27bd Backport 59a2ba9b, f5912c6b, f6ddaa10
/usr/local/apnscp/lib/modules/surrogates /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp ~
/usr/local/apnscp /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp ~
Compiled services and packages files removed!
Nothing to migrate.
Nothing to migrate.
Updating to v3.2.48.4
Previous HEAD position was 50eca27bd Backport 59a2ba9b, f5912c6b, f6ddaa10
HEAD is now at ca92487ad CHG: Use release with bundled React assets (Invoiceninja)
/usr/local/apnscp/lib/modules/surrogates /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp ~
/usr/local/apnscp /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp /usr/local/apnscp ~
Compiled services and packages files removed!
Nothing to migrate.
Nothing to migrate.

It was being held up because of a git conflict, had to checkout some files that it thought were modified and then upcp was able to complete.

Yes, so the root cause stems from flipping between edge and major.

Edge changes the PHP-FPM service format to php-fpm@siteXX from php-fpm-siteXX in order to deduplicate systemd services.

A migration removes all old references from php-fpm-siteXX in favor of php-fpm@siteXX.

Flipping back to major (3.2.48.x) assumes the old style format. Your best solution for this server is to remain on edge until the next release. Once this is done, EditDomain --reconfig --all && systemctl daemon-reload

10-4, roger that!