webERP Forum
Memory problems on ReorderLevelLocation.php - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (/forumdisplay.php?fid=8)
+--- Thread: Memory problems on ReorderLevelLocation.php (/showthread.php?tid=2098)



Memory problems on ReorderLevelLocation.php - PakRicard - 02-12-2014 01:08 PM

Hi:
I'm facing problems with ReorderLevelLocation.php, probably due to memory limitations, but not sure how to track it down:

If I use ReorderLevelLocation.php to modify the reorder levels for a stock category below X not discontinued items, it works perfectly.

If the stock category has over X not discontinued items to show, the script shows the item list correctly, allows me to select the new RL desired, but when I click on "Update" the script does not make any change to the database and returns to the script initial selection.

Found out the limit X is around 150 items. Below works OK, over it not.

So, I suppose it is a memory issue. webERP is running in a Hostgator sharing hosting plan.

Changed error reporting to -1 but no message is shown

Changed php.ini to:
memory_limit = 256M
post_max_size = 256M
but still the same.

Any clue about the problem? What could be the reason?


RE: Memory problems on ReorderLevelLocation.php - phil - 02-12-2014 05:10 PM

There is a miserable extension called suhosin - if you have it ,,, remove it.
Also, php.ini has a maximum number of input variables so if there are a lot of data on a page then we can run into issues here - php.ini
max_input_vars
you can probably check your apache error.log to figure out the reason for sure


RE: Memory problems on ReorderLevelLocation.php - Forums - 02-12-2014 05:59 PM

I think to describe as miserable an extension that is widely held as plugging many security holes in PHP is a little harsh. There are many good reasons that it is installed by default in so many places. The main criticism of Suhosin has always been the lack of configurability in it, Having very large POST arrays can be used to attack a server, so Suhosin sets a limit on it. It would appear to me to set that limit way too low, but the guys who write Suhosin are some of the leading experts on PHP security so we shouldn't just dismiss their efforts as "miserable".

Only remove it permanently if you absolutely have to.

Tim


RE: Memory problems on ReorderLevelLocation.php - PakRicard - 02-12-2014 06:39 PM

Thanks to both of you!!!

I checked my php.ini and there was no trace on suhosin, no max_input_vars and no error recorded on any log...
googling max_input_vars pointed me to http://stackoverflow.com/questions/10303714/php-max-input-vars

Just added the line max_input_vars = 3000 to my php.ini and now it works.

Thanks Phil and Tim for pointing me on the right direction.