Value is not a valid option. (1.0.37)

alrnetwork

Verified User
Joined
Feb 12, 2021
Messages
162
Location
Europe UTC+2
Hi there,

Just updated to CustomBuild 1.0.37 from 1.0.36 and it seems that by doing this, I am unable to change any of the CustomBuild "Edit Options" within the DA web interface.

Changing any value, including setting things like php2_release to "no" from 8.0 or any other value will cause the following error message to be displayed, and all updates are reversed.

Screenshot 2021-11-08 at 19.10.24.png

Any idea what is causing this? Is it a known issue? This happens on a fresh install of DA as well as servers which have been running it for a long time.

Thanks!
 
I was unable to reproduce it. May you try cleaning the cache? Do you have any value set to literal "value" ?
 
i am facing same issue as well :)
May you answer the questions above? If you aren't sure about them - we may just connect to your box to check what's going on there (we'd need access details for this).
 
Same problem here :
Parse error: syntax error, unexpected '?' in /usr/local/directadmin/plugins/custombuild/admin/tabs/edit_options.php on line 33
 
Here too

It's the null coalescing operator which is added in php 7.0. This is probably on systems that still have a php 5.6.x installed.

You can change line 33 of /usr/local/directadmin/plugins/custombuild/admin/tabs/edit_options.php to

$group[$key] = isset($value['current']) ? $value['current'] : $value['default'];

to get custombuild woking again.
 
Last edited:
You can change line 33 of /usr/local/directadmin/plugins/custombuild/admin/tabs/edit_options.php to

$group[$key] = isset($value['current']) ? $value['current'] : $value['default'];

to get custombuild woking again.
Yep that worked, we even didn't realize that it was caused by php 5.6 :)
 
You still might have a php 5.6 roaming around on the server. The error is caused bij the '??' operator which was introduced in php 7.0.
I want to say that this happened also on a fresh install of Ubuntu 20.04 minimal. If 5.6 was installed, it was installed by the DirectAdmin installer script.. not me and not bundled with the server... so not sure why that would have happened.
 
I saw this thread and tested on our server and got the same custombuild error when saving edit options after upgrading to 1.0.37.

I'd suggest first trying smtalk's suggestion of clearing the cache in your web browser, or use a private/incognito browser window.
This fixed it for me after I tried a few other things.

We're running on Almalinux, which was a fresh install just 2 months ago, and only have php7.4 installed.
I can't find any other versions of php on the server.
We run the evolution skin as default, but I found if I switched to the ehanced skin the edit options saved correctly.
But when I switched back to the evolution skin the errors returned.

I then tried from a different browser (Firefox instead of Edge) and I was able to successfully save the edit options.
I finally cleared the cache in Edge using the clear browsing data for all time and afterwards was able to successfully save the edit options.
 
May you answer the questions above? If you aren't sure about them - we may just connect to your box to check what's going on there (we'd need access details for this).
its fixed

thanks :)
 
I was unable to reproduce it. May you try cleaning the cache? Do you have any value set to literal "value" ?

Same issue fresh install Almalinux 8.5, this seems happen always if one chose php 5.6 as first php handler.

So solution mentioned here https://forum.directadmin.com/threads/value-is-not-a-valid-option-1-0-37.64918/#post-338084

$group[$key] = isset($value['current']) ? $value['current'] : $value['default'];

fixed it for me.

You might want to update the code so updates don't overwrite it.

@smtalk @DirectAdmin Support
 
Here too

It's the null coalescing operator which is added in php 7.0. This is probably on systems that still have a php 5.6.x installed.

You can change line 33 of /usr/local/directadmin/plugins/custombuild/admin/tabs/edit_options.php to

$group[$key] = isset($value['current']) ? $value['current'] : $value['default'];

to get custombuild woking again.
Did not work for me, I'm using Directadmin V 1.642

Still the same error even after change line 33 to $group[$key] = isset($value['current']) ? $value['current'] : $value['default'];

Any thoughts ?
 
Hello friends
Just clear your browser cache
Or use the private page to solve this problem
 
Back
Top