jstein
jstein

Reputation: 643

Configuring php.ini in Homestead

I am trying to change the variable max_input_vars in my php.ini file by specifying

; How many GET/POST/COOKIE input variables may be accepted
max_input_vars = 2500

and running

sudo nginx -s reload

Even though I set this variable to 2500 on both my local machine (C:\xampp\php\php.ini) and on Homestead (/etc/php5/fpm/php.ini), I keep receiving the following error message

  parse_str(): Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini

I know .htaccess overrides php.ini on a per site basis, are there any other files which override php.ini? Are there any other services that need to be reloaded after changing the php.ini file?

Upvotes: 4

Views: 9077

Answers (4)

theRana
theRana

Reputation: 704

SSH to the virtual machine:

homestead ssh

The latest version of PHP in Homestead is 7.1. Edit the corresponding php.ini file:

sudo vim /etc/php/7.1/fpm/php.ini 

Search for max_input_vars and change its value.

Upvotes: 0

saber tabatabaee yazdi
saber tabatabaee yazdi

Reputation: 4959

i had this problem in laravel

i added

ini_set('max_input_vars', 2500);

in server.php when use laravel

Upvotes: 1

mpalencia
mpalencia

Reputation: 6007

On the latest laravel homestead, php.ini is located in

/etc/php/7.0/fpm/php.ini

(Make sure you enter into ssh in to the homestead environment)

try to edit it using

sudo su

Upvotes: 5

rigobcastro
rigobcastro

Reputation: 1257

Have you tried this?

ini_set('max_input_vars', 2500);

At the beginning of this file bootstrap/autoload.php

Upvotes: 3

Related Questions