webERP Forum
MRP calculation error - Printable Version

+- webERP Forum (
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (/forumdisplay.php?fid=8)
+--- Thread: MRP calculation error (/showthread.php?tid=8367)

MRP calculation error - alanmi3833 - 09-25-2019 12:56 AM

I suddenly have the following error when running MRP calculation, used to work fine. Did no update recently.

Any ideas

Quote:Start time: 04:42:50

Initialising tables .....

Fatal error: Maximum execution time of 120 seconds exceeded in C:\xampp\htdocs\webERP\includes\ on line 57


RE: MRP calculation error - falkoner - 09-25-2019 01:12 AM

Hi Alan, this should be relatively easy to fix. All that has happened is that as your number of transactions and stock items has increased the script takes longer to run, and you have come up against the PHP maximum execution time. This is done to stop scripts running on for ever and crashing the system.

You need to locate the php.ini file, the whereabouts of which depends on the operating system. Search in this file for the line:


and change the 120 to a higher number. This should then work.


RE: MRP calculation error - alanmi3833 - 09-25-2019 01:23 AM

Hi Tim
That was what I thought too.
Running Windows 8 with XAMPP 3.2.3.

Already changed php.ini to the following:
Quote:; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI

Still giving 120 as the timeout, system rebooted to make sure the change are seen by Apache, hence the question.


RE: MRP calculation error - falkoner - 09-25-2019 01:59 AM

I seem to recall that XAMPP installed more than one php.ini but it's a long time ago.

You should be able to set the execution time in the script itself as per (, so if you put in:

ini_set('max_execution_time', 240);

at the top of MRP.php straight after the <?php line it should just set it for that script. However I have had mixed results with this, and haven't had time to find out why.



RE: MRP calculation error - alanmi3833 - 09-25-2019 02:56 AM

Nope that didn't work.

Changed the following line in ..../weberp/config.ini

$MaximumExecutionTime = 120;

$MaximumExecutionTime = 200;

Have to change in both php.ini and config.ini.

Working fine now again.

Thanks Tim

RE: MRP calculation error - falkoner - 09-25-2019 04:46 AM

Thanks Alan I forgot about the entry in the config file. Thanks for reminding me. Glad it is sorted for you.


RE: MRP calculation error - alanmi3833 - 09-25-2019 04:05 PM

Does this entry override the php.ini file if it is less?
Do we need that entry, seems to be duplicating the entry in the php.ini file.


RE: MRP calculation error - falkoner - 09-25-2019 06:19 PM

Hi Alan,

Yes this entry in the config file will always override the php.ini setting, but only for the time it takes to run that script. Obviously as every webERP script processes that file, it would stand for all webERP scripts. However by including it in there it does enable a different setting for each application running on that server, and I do see some advantages in that. So yes, my personal opinion is that we do need it, though others may have different views.