Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

php.ini max_input_vars #138

Closed
MisterMike opened this issue May 13, 2020 · 8 comments
Closed

php.ini max_input_vars #138

MisterMike opened this issue May 13, 2020 · 8 comments
Assignees
Labels
enhancement Not really required but improves quality of life

Comments

@MisterMike
Copy link

I think the default value of max_input_vars should be increased to at least 5000.

I encountered the issue using php 7.4, where the variable is commented out in the php.ini and resulting in a value of 1000. For medium to big matrix fields, this is not large enough.

What do you guys think ?

@jasonmccallister
Copy link
Contributor

@MisterMike we would like to introduce an easy way to edit through the CLI. We have an open issue (#57) that will add a php command. Since we just tagged beta 3, it will likely work along the same lines of the db command:

However, we will most likely have an edit command with some common options for editing the php settings.

Would love to get some feedback on the common items you would like to change for PHP settings (max_input_vars would be one of course).

Here is an example of the new db command. It has a lot of sub commands to make managing databases easier like backup, import, and add.

nitro db
Manage databases

Usage:
  nitro db [flags]
  nitro db [command]

Available Commands:
  add         Add a new databases
  backup      Backup a database
  import      Import database
  remove      Remove databases
  restart     Restart databases
  start       Start databases
  stop        Stop databases

Flags:
  -h, --help   help for db

Global Flags:
  -d, --debug            Show command output and do not execute.
  -m, --machine string   Name of a machine.

Use "nitro db [command] --help" for more information about a command.

@jasonmccallister jasonmccallister added the enhancement Not really required but improves quality of life label May 19, 2020
@MisterMike
Copy link
Author

Dear Jason, thanks for the update. Many of us will be looking forward to the new enhancements!

I think most important would be settings that interfere with the general use of Craft, while there might be others from the category "nice to have".

upload_max_filesize
max_execution_time
max_input_time
max_input_vars
max_file_uploads
memory_limit

maybe also

error_log = 
error_reporting =
display_errors = 

In general, max_input_vars is what I need to adjust often, paired with upload_max_filesize

@bencroker
Copy link
Contributor

bencroker commented May 20, 2020

I'd love to see session.gc_maxlifetime increased (and perhaps configurable) so that users are not logged out after 1440 seconds (24 mins) of inactivity. I would suggest a value of at least 2592000 seconds (30 days).

For reference: https://nystudio107.com/blog/the-case-of-the-missing-php-session

@jasonmccallister
Copy link
Contributor

@MisterMike and @bencroker I am starting to implement these changes in #57. I have added nitro php --restart|--stop|--start already but looking at adding --set-max-execution-time=120 which will tell the current version (or the one provided with a flag of --php-version). Does this API make sense?

@jasonmccallister jasonmccallister self-assigned this Jul 14, 2020
@bencroker
Copy link
Contributor

It feels like it might become cumbersome if you were to add a command for each individual setting. Would allowing php.ini settings to be set via a configuration file not being easier and more versatile in the long run?

@jasonmccallister
Copy link
Contributor

@bencroker I agree that it might be cumbersome. I think its best to increase those by default and then expose a new command to change them only if needed.

I have that implemented in a PR that I will wrap up with SSL support and it exposes commands like:

nitro php iniset max_input_vars <value>

@bencroker
Copy link
Contributor

That sounds perfect Jason!!

@jasonmccallister
Copy link
Contributor

This was released with 1.0.0, closing this ticket out!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Not really required but improves quality of life
Projects
None yet
Development

No branches or pull requests

3 participants