
Summary
The os runtime php update-setting command looks like it only modifies settings that already exist in the phpIniOverride block. When the setting does not exist, the command returns "status": "success" without inserting it, creating a false impression that the operation succeeded.
Steps to reproduce
- Update an EXISTING setting — works correctly
root@f2ccb3e81c08:/infinite# grep session.gc_maxlifetime /app/conf/php-webserver/primary.conf
php_value session.gc_maxlifetime 1800
root@f2ccb3e81c08:/infinite# os runtime php update-setting --name session.gc_maxlifetime --value 1440 --version 8.2
{
"status": "success",
"body": "PhpConfigsUpdated",
"readableMessage": ""
}
root@f2ccb3e81c08:/infinite# grep session.gc_maxlifetime /app/conf/php-webserver/primary.conf
php_value session.gc_maxlifetime 1440
# Result: setting updated from 1800 to 1440 ✅
- Add a NON-EXISTENT setting — returns success but does nothing
root@f2ccb3e81c08:/infinite# grep session.gc_probability /app/conf/php-webserver/primary.conf
root@f2ccb3e81c08:/infinite#
root@f2ccb3e81c08:/infinite# os runtime php update-setting --name session.gc_probability --value 1 --version 8.2
{
"status": "success",
"body": "PhpConfigsUpdated",
"readableMessage": ""
}
- Verify — setting was not added
root@f2ccb3e81c08:/infinite# grep session.gc_probability /app/conf/php-webserver/primary.conf
root@f2ccb3e81c08:/infinite#
Expected behavior
- If the setting does not exist in
phpIniOverride: insert the new php_value line
- If the setting exists: update the value
- If the operation cannot be completed: return an explicit error instead of
"status": success
Impact
Operators relying on update-setting to apply configuration changes may believe the fix was applied when it was not. This leads to unresolved issues persisting in production without any indication of failure.
Related: goinfinite/os-services#73 — session.gc_probability missing from default phpIniOverride template
Summary
The
os runtime php update-settingcommand looks like it only modifies settings that already exist in thephpIniOverrideblock. When the setting does not exist, the command returns"status": "success"without inserting it, creating a false impression that the operation succeeded.Steps to reproduce
root@f2ccb3e81c08:/infinite# grep session.gc_maxlifetime /app/conf/php-webserver/primary.conf php_value session.gc_maxlifetime 1800 root@f2ccb3e81c08:/infinite# os runtime php update-setting --name session.gc_maxlifetime --value 1440 --version 8.2 { "status": "success", "body": "PhpConfigsUpdated", "readableMessage": "" } root@f2ccb3e81c08:/infinite# grep session.gc_maxlifetime /app/conf/php-webserver/primary.conf php_value session.gc_maxlifetime 1440 # Result: setting updated from 1800 to 1440 ✅root@f2ccb3e81c08:/infinite# grep session.gc_probability /app/conf/php-webserver/primary.conf root@f2ccb3e81c08:/infinite# root@f2ccb3e81c08:/infinite# os runtime php update-setting --name session.gc_probability --value 1 --version 8.2 { "status": "success", "body": "PhpConfigsUpdated", "readableMessage": "" }Expected behavior
phpIniOverride: insert the newphp_valueline"status": successImpact
Operators relying on
update-settingto apply configuration changes may believe the fix was applied when it was not. This leads to unresolved issues persisting in production without any indication of failure.Related: goinfinite/os-services#73 —
session.gc_probabilitymissing from defaultphpIniOverridetemplate