1 (edited by netracer 01/27/2015 01:24:40 pm)

Topic: Batch Invoice from Search Not Invoiced Deliveries - Failed

Is there a limit of Search Not Invoiced Deliveries that can be batch converted to Invoice?

I have this scenario - 46 Search Not Invoiced Deliveries - selected, Hit Batch, goes to this Screen :Issue Batch Invoice for Delivery Notes

Click Process Invoice but nothing happens except page refresh.

*Other Search Not Invoiced Deliveries with about 10 Search Not Invoiced Deliveries works without a problem.

any clues?

Re: Batch Invoice from Search Not Invoiced Deliveries - Failed

Increase script timeout value in php. - max_execution_time.
It may also need more memory - memory_limit.
Try to choose half and see if it is successful, and progressively increase / decrease it to check when it hits the limit.

Re: Batch Invoice from Search Not Invoiced Deliveries - Failed

I checked the error_log and produce this result
PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0

Re: Batch Invoice from Search Not Invoiced Deliveries - Failed

increase to 2000, restart apache, logout / login and tried. similar results.
memory_limit 150MB
max_execution_time 30s

Re: Batch Invoice from Search Not Invoiced Deliveries - Failed

increased to 3000, invoice generated. issue resolved

6 (edited by apmuthu 01/27/2015 07:57:16 pm)

Re: Batch Invoice from Search Not Invoiced Deliveries - Failed

Thanks for the feedback. This will be the case when large reports are to be generated like when we have too many items.

Generally available since PHP v5.3.9 but Debian implemented it in PHP 5.3.3-7+squeeze7 but may be ignored (YMMV) but works in PHP 5.1.6.

Adding the directive into php.ini or placing following lines into .htaccess will work:

php_value max_input_vars 3000
php_value suhosin.get.max_vars 3000
php_value suhosin.post.max_vars 3000
php_value suhosin.request.max_vars 3000

Please note, you cannot set this directive in run-time with function ini_set(name, newValue).

The best way is to compact all form data using javascript.

On the receiving side you cannot use the PHP parse_str() function because the max_input_vars directive affects this function too, so you need something else like my_parse_str().

Otherwise, the serialize and JSON.stringify may work together.