webERP Forum

Full Version: MRP calculation error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

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.

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.

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.


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
Thanks Alan I forgot about the entry in the config file. Thanks for reminding me. Glad it is sorted for you.

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.

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.