Managing phpbb via CLI

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Get Involved
hiran
Registered User
Posts: 25
Joined: Sun Mar 03, 2024 10:14 pm

Managing phpbb via CLI

Post by hiran »

I am just experiencing my first steps on the CLI to manage phpbb. And am interested in setting configuration values and ensuring some key users are configured the way they should be.

The first thing for me though would be to check if action is necessary at all. Which means I'd like to know the currently used settings, or the currently installed users and the details.

Is it just me, or are commands like user:list and config:list just missing? What is the intended way to get around this?
Last edited by hiran on Thu Mar 21, 2024 7:00 am, edited 1 time in total.
User avatar
ssl
Registered User
Posts: 1988
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Managing phpbb via CLI

Post by ssl »

You will find all the information about the CLI here: https://area51.phpbb.com/docs/dev/3.3.x/cli/index.html
hiran
Registered User
Posts: 25
Joined: Sun Mar 03, 2024 10:14 pm

Re: Managing phpbb via CLI

Post by hiran »

Ah, I was just about to repost in the support forum and delete this post.
Pardon me, I would not like to delete your answer.
hiran
Registered User
Posts: 25
Joined: Sun Mar 03, 2024 10:14 pm

Re: Managing phpbb via CLI

Post by hiran »

ssl wrote: Thu Mar 21, 2024 7:00 am You will find all the information about the CLI here: https://area51.phpbb.com/docs/dev/3.3.x/cli/index.html
Thank you for the hint. Looking at that generic CLI documentation it just states what I already know but it does not anwer my questions.
User avatar
warmweer
Jr. Extension Validator
Posts: 11779
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Managing phpbb via CLI

Post by warmweer »

There's no need for CLI.
You can easily use the ACP to configure your users (I suspect you're referring to the permissions)
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 544
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Re: Managing phpbb via CLI

Post by danieltj »

warmweer wrote: Thu Mar 21, 2024 9:03 am There's no need for CLI.
You can easily use the ACP to configure your users (I suspect you're referring to the permissions)
This is the problem with phpBB as a whole. There's no desire to make progress and improve the software.

Your post doesn't answer their question. They're asking if there are any CLI actions that allow them to manage users. It appears there isn't (for what they want) so the correct response is pointing people to a potential extension request as someone might decide to develop it.

You're absolutely correct that they could check through the ACP, but the entire development industry has moved onto modern features and tooling which includes advanced CLI tools. I get that feature creep is a tough thing to manage but phpBB really does take it too far in the wrong direction.

To answer the OPs question, there isn't any advanced user management in phpBB through a CLI or API. Unfortunately you'll need to go the old fashioned route and use the ACP and multiple tabs. I'd suggest posting in the extension request forum or seeking custom phpBB development work to achieve what you're after.
Awesome Payments now available | Auto Moderator coming soon
User avatar
ssl
Registered User
Posts: 1988
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Managing phpbb via CLI

Post by ssl »

danieltj wrote: Fri Mar 22, 2024 3:10 pm This is the problem with phpBB as a whole. There's no desire to make progress and improve the software.
We know that you are no longer in agreement with phpBB's development policy, in which case what are you still doing here?
Sorry for my English ... I do my best! :anger_right:

:point_right_tone3: phpBB: 3.3.13 | PHP: 8.3.9
:point_right_tone4: [Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26849
Joined: Fri Aug 29, 2008 9:49 am

Re: Managing phpbb via CLI

Post by Mick »

hiran wrote: Thu Mar 21, 2024 6:57 amCLI to manage phpbb
What ‘managing’ are you talking about specifically?
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
warmweer
Jr. Extension Validator
Posts: 11779
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Managing phpbb via CLI

Post by warmweer »

danieltj wrote: Fri Mar 22, 2024 3:10 pm This is the problem with phpBB as a whole. There's no desire to make progress and improve the software.
Oh, come off it.
That statement is ridiculous.

As to CLI: that's something for advanced users (a minority of which, even with 20+ years of using phpBB, I don't consider myself part of).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
danieltj
Infrastructure Team Member
Infrastructure Team Member
Posts: 544
Joined: Thu May 03, 2018 9:32 pm
Location: United Kingdom
Name: Daniel James

Re: Managing phpbb via CLI

Post by danieltj »

ssl wrote: Fri Mar 22, 2024 3:27 pm
danieltj wrote: Fri Mar 22, 2024 3:10 pm This is the problem with phpBB as a whole. There's no desire to make progress and improve the software.
We know that you are no longer in agreement with phpBB's development policy, in which case what are you still doing here?
So I’m not allowed an opinion?
warmweer wrote: Sat Mar 23, 2024 10:04 am
danieltj wrote: Fri Mar 22, 2024 3:10 pm This is the problem with phpBB as a whole. There's no desire to make progress and improve the software.
Oh, come off it.
That statement is ridiculous.

As to CLI: that's something for advanced users (a minority of which, even with 20+ years of using phpBB, I don't consider myself part of).
Is really? I’m not suggesting that phpBB should add loads of social features, but look at the last minor release (3.3) feature list. Emojis were added plus some other boring features no one cares about.

Yet phpBB is currently missing the following features you can kind in nearly all other softwares:
  • No advanced CLI tools which people would use if it existed
  • No API support at all
  • No way to manage users and forums in batches (ie. multi edit users)
  • No AJAX support for new posts or topics (requires page reload)
  • No advanced authentication tools like 2FA and OAuth
I could go on. It doesn’t mean phpBB is inherently bad, but it’s glaringly obvious that it’s missing a lot of features that are standard in a lot of other products.

If any of these are deal breakers, then sure you can use something else but why not add these features in if people would use them?

It doesn’t matter if you’ve used phpBB since version 1 and wouldn’t use any of those features. Some people might want to and they can’t without a bespoke extension. This is phpBB as a projects whole mentality which is basically keep everything as simple as possible and then just add everything in as an extension.

I didn’t even think about documentation until now either. Documentation for how to get involved in the project is poor and hard to follow and largely closed off. Documentation for extensions is largely nonexistent which means new developers aren’t as common in the community.

phpBB as a project could be so much better if it put a focus on getting more people involved in the project to build upon it but there’s no appetite for that. That’s why you get people on the forums every so often asking if we’ll ever get a phpBB 4. From the outside people that the software has stopped development.
Last edited by Mick on Sat Mar 23, 2024 5:19 pm, edited 1 time in total.
Reason: Fixed quotes so they make sense.
Awesome Payments now available | Auto Moderator coming soon
User avatar
ssl
Registered User
Posts: 1988
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert

Re: Managing phpbb via CLI

Post by ssl »

danieltj wrote: Sat Mar 23, 2024 4:48 pm So I’m not allowed an opinion?
In this case use your energy to help the development of phpBB, you who are so quick to give a negative opinion.
Sorry for my English ... I do my best! :anger_right:

:point_right_tone3: phpBB: 3.3.13 | PHP: 8.3.9
:point_right_tone4: [Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26849
Joined: Fri Aug 29, 2008 9:49 am

Re: Managing phpbb via CLI

Post by Mick »

@danieltj: If you feel so strongly about it you should post in the ideas forum, one idea per topic.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
hiran
Registered User
Posts: 25
Joined: Sun Mar 03, 2024 10:14 pm

Re: Managing phpbb via CLI

Post by hiran »

warmweer wrote: Thu Mar 21, 2024 9:03 am There's no need for CLI.
You can easily use the ACP to configure your users (I suspect you're referring to the permissions)
That's the point: I do not want to manually configure users. Instead I want to script the setup. But how would you add users if you cannot even check whether the user already exists or has been created successfully?
hiran
Registered User
Posts: 25
Joined: Sun Mar 03, 2024 10:14 pm

Re: Managing phpbb via CLI

Post by hiran »

Mick wrote: Fri Mar 22, 2024 3:51 pmWhat ‘managing’ are you talking about specifically?
Any activity of bringing a vanilla installation of phpbb up to speed for a running setup. There are settings that can be done via the UI, and somehow I'd expect a CLI to allow me doing the same via command line. Now there is a command to get and set configuration parameters. Setting takes two parameters: a key and the value. But what are the known keys? Since there is no list function, I also cannot print the current values and compare to what I want to have.
Last edited by Mick on Tue Apr 02, 2024 8:08 am, edited 1 time in total.
Reason: Removed unnecessary quotes.
hiran
Registered User
Posts: 25
Joined: Sun Mar 03, 2024 10:14 pm

Re: Managing phpbb via CLI

Post by hiran »

hiran wrote: Sun Mar 31, 2024 12:40 am
Looks like I found a value that gives a meaningful result:

Code: Select all

php bin/phpbbcli.php config:get captcha_plugin

core.captcha.plugins.recaptcha_v3
Now a lot of people might wonder how I found out captcha_plugin.
After all in phpbb's database there is a table called phpbb_config. The first column config_name apparently has the parameter names that can be read and set via the cli.

So the list function I was expecting to find could be as simple as

Code: Select all

mariadb -e "select * from phpbb_config" phpbb
Alternatively add this list of parameters to the documentation.
Last edited by Mick on Tue Apr 02, 2024 8:06 am, edited 1 time in total.
Reason: Removed unnecessary full quotes.

Return to “phpBB Discussion”